Creating a Windows Forms User Interface

Slides:



Advertisements
Similar presentations
Information System Design Lab 5&6. User Interface Design.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Chapter 1: An Introduction to Visual Basic 2012
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Chapter 1: An Introduction to Visual Basic.NET Programming with Microsoft Visual Basic.NET, Second Edition.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Graphical User Interface (GUI) A GUI allows user to interact with a program visually. GUIs are built from GUI components. A GUI component is an object.
Advanced Object-Oriented Programming Features
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Microsoft Visual Basic 2012 CHAPTER TWO Program and Graphical User Interface Design.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Chapter 1: An Introduction to Visual Basic 2005 Programming with Microsoft Visual Basic 2005, Third Edition.
Chapter 12: Using Controls. Examining the IDE’s Automatically Generated Code A new Windows Forms project has been started and given the name FormWithALabelAndAButton.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Dr Dat Tran - Week 4 Lecture Notes 1 ToolStrip Programming Graphical User Interfaces PG (7110) University of Canberra School of Information Sciences &
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 13 – Graphical User Interfaces Part 2 Outline.
Graphical User Interface Concepts - Part 2 Session 09 Mata kuliah: M0874 – Programming II Tahun: 2010.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
1 Extend is a simulation tool to create models quickly, with all the blocks you need and without even having to type an equation. You can use a series.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Chapter 2 – Introduction to the Visual Studio .NET IDE
1 Chapter Ten Using Controls. 2 Objectives Learn about Controls How to create a Form containing Labels How to set a Label’s Font How to add Color to a.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Understand How to Create New Controls and Extend Existing Controls Windows Development Fundamentals LESSON 2.3A.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Understand Databound Controls Windows Development Fundamentals LESSON 4.2A.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Building a Simple Text Editor. Create a text editor with the following features: (1) Uses a MenuStrip with File, and Edit tabs (2) The user can create.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Dive Into® Visual Basic 2010 Express
Chapter 1: An Introduction to Visual Basic .NET
Graphical User Interface
Working with Data Blocks and Frames
Chapter 2: The Visual Studio .NET Development Environment
Working in the Forms Developer Environment
Chapter 1: An Introduction to Visual Basic 2015
Chapter Topics 15.1 Graphical User Interfaces
Chapter 2 – Introduction to the Visual Studio .NET IDE
ASP.NET Web Controls.
3.01 Apply Controls Associated With Visual Studio Form
Graphical User Interface Concepts: Part I
Program and Graphical User Interface Design
3.01 Apply Controls Associated With Visual Studio Form
Chap 7. Building Java Graphical User Interfaces
Graphical User Interfaces -- Introduction
Chapter 2 Visual Basic Interface
Program and Graphical User Interface Design
Multi-form applications and dialogs
Chapter 2 – Introduction to the Visual Studio .NET IDE
Visual Studio.
Chapter 15: GUI Applications & Event-Driven Programming
Creating a Windows Application Project in Visual Studio
Visual C# - GUI and controls - 1
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Presentation transcript:

Creating a Windows Forms User Interface Lesson 3

Objectives

Working with Windows Forms Now that you can create a Windows Forms project and a default Windows Form, you will learn how to modify the default Windows Form’s behavior by setting property values or by using the Windows Forms Design View editor. Once you can create and modify one Windows Form, you learn how to add and modify additional Windows Forms to create a Multiple Document Interface (MDI).

Properties Window As one of the few activities that do not require coding, you can modify the appearance of Windows Forms by using the Properties window.

Common Windows Forms Properties ControlBox FormBorderStyle Icon Location ShowIcon ShowInTaskbar StartPosition Size Text TopMost WindowState

Adding Multiple Windows Forms Using the Add New Item dialog, you can add multiple Windows Forms to your application. You can organize multiple Windows Forms into a Single Document Interface (SDI) or a Multiple Document Interface (MDI).

Creating Windows Forms Inheritance You can instantiate new Windows Forms from other Windows Forms. You can inherit new Windows Forms from other Windows Forms and then extend your inherited Windows Forms to add additional functionality. Instantiating a Windows Form from another Windows Form is performed at run time in code. Inheriting a Windows Form from another Windows Form is performed at design time by using the Add New Item dialog.

Extending Inherited Windows Forms By using Virtual methods in the base Windows Forms class, inherited Windows Forms can Override the methods and extend the base class’s functionality. A Virtual method tells the Windows Forms class that this method will use the base class defined functionality, unless a derived class has an Override method. An Override method is a method declaration that replaces the Virtual method in the base class with new functionality.

Inheritance Picker Dialog

Windows Forms Controls When designing a Windows Forms Application, there are various Windows Forms Controls that can be used to create a functional user interface. The challenge is to select and organize the right Windows Forms Controls to perform your application’s desired result.

Windows Forms Controls While implementing a Windows Forms Application, you will need to work with several types of controls, including: Container controls Menus and Toolbars controls Basic Input controls Advanced Input controls Component controls Dialog controls Controls can be combined in multiple ways to create the desired user interface.

Container Controls Dividing up a Windows Form’s Graphical User Interface (GUI) into manageable areas can be accomplished using container controls. Container controls group other controls together and provides a more organized user interaction.

Menus and Toolbars Control It is very common in a Windows Forms Application to add navigation functionality in the form of menus and toolbars. Menus and Toolbars controls are a special category of container controls that only hold Menu and Button controls.

Windows Forms Menus and Toolbars Controls MenuStrip creates a system of menus and sub-menus for the user to navigate the functionality of an application. ContextMenuStrip has all of the same features as the MenuStrip control, with the exception that the ContextMenuStrip control does not automatically appear when the application runs. To make the ContextMenuStrip control visible, you must use the Show method.

Windows Forms Menus and Toolbars Controls ToolStrip creates a toolbar of ToolStripButton controls to access application functionality. ToolStripContainer holds multiple ToolStrip controls. StatusStrip creates a Status toolbar that can contain multiple ToolStripStatusLabel controls.

Input Controls Gathering inputs from a user during the execution of your application can be a vital function. You will also work with input controls that will be grouped into two categories: Basic Input Controls: Controls that have a specific functionality with several common properties and methods. Advanced Input Controls: Controls that have multiple functionalities with unique properties and methods.

Windows Forms Design View Editor As an alternative to changing property values in the Properties window, Visual Studio provides you with a What You See Is What You Get (WYSIWYG) editor. The Windows Forms Design View editor provides you with a real-time view of how your application’s user interface will appear at run time. Using the Windows Forms Design View editor, you can perform the following: Move controls Resize controls Align controls

Basic Input Controls Visual Studio provides a set of controls that all have a common set of properties and methods. These Basic Input controls are used to build basic functionality in your application’s user interface.

Basic Input Controls All Input Controls - Several properties that apply to all of the Basic Input controls. Label - A read-only text area you use to provide information to the user. TextBox - A read/write text area. ListBox - A set of rows where each row contains a piece of information. ComboBox - A TextBox and ListBox control. CheckBox - A Label control with a CheckBox control. RadioButton - A Label control with a round (Radio) CheckBox control. Button - A Label control inside of a Button control.

Advanced Input Control Each Advanced Input control typically has very specific functionality and is designed to extend the Basic Input controls. Treeview ListView DateTimePicker CheckListBox MaskedTextBox

Component Controls Most component controls extend other controls and provide centralized common functionality. Error Provider Help Provider EventLog BackgroundWorker

Dialog Controls ColorDialog FontDialog FolderBrowserDialog The Dialog controls provide a centralized functionality for selecting a folder, files, color, or font. Each Dialog control presents the user with an intuitive interface for making an appropriate selection. Dialog Controls include: ColorDialog FontDialog FolderBrowserDialog OpenFileDialog SaveFileDialog

Windows Forms Control Library You use the Windows Forms Control Library Template to create a default custom control. The Windows Forms Control Library creates a default custom control with a blank control area and the inherited properties and methods from the Windows.Forms.UserControl class. You will need to add more properties and methods to give your custom control more functionality.

Inheriting a Custom Control Library New custom user controls can be created from existing controls by using inheritance. When you create a custom user control based on an already existing control, you can extend the base control to create a new custom user control. Custom user controls support standard inheritance declarations. Depending on how the base control was declared and created, a new customer user control can override or extend existing functionality.

Summary You learned how to create a Windows Forms Application and modify its properties using the Properties window. You learned how to inherit a Windows Form based on another Windows Form. You learned how to create a Windows Forms control, arrange the Windows Forms control on the Windows Forms area using the Properties window and the Design View editor, and modify various Windows Forms controls properties and methods to demonstrate most controls’ functionality.

Summary You learned how to create a Custom User Control and add other controls to create a new control. You learned how to inherit a Custom User Control and override the derived controls’ functionality.