0% found this document useful (0 votes)
8 views12 pages

Lesson+9

The document provides an overview of building Windows Forms applications, focusing on the Graphical User Interface (GUI) and its components. It outlines the four steps to create a Windows form application, including interface creation, property setting, coding, and testing. Additionally, it details various controls used in C# applications, their functions, and naming conventions for better organization and readability.

Uploaded by

elrodjosh350
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views12 pages

Lesson+9

The document provides an overview of building Windows Forms applications, focusing on the Graphical User Interface (GUI) and its components. It outlines the four steps to create a Windows form application, including interface creation, property setting, coding, and testing. Additionally, it details various controls used in C# applications, their functions, and naming conventions for better organization and readability.

Uploaded by

elrodjosh350
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Building

Windows
Forms
Application
Lesson 9
GUI
Graphical User Interface

❑ is a form of user interface that allows users to interact with


electronic devices through graphical icons and visual indicators
such as secondary notation.
❑ A window attribute that makes its application user-friendly.
❑ It contains controls that users can use to interact with forms.
❑ It is what the users see every time they use an application.
GUI
Graphical User Interface
Examples:
Form
❑ is the location where the interface is designed.

Windows Form application


❑ will allow the creation of a user interface by dragging and dropping
controls from the toolbox to a form.
Four steps in creating a
Windows form application
1. Create the interface

2. Set the properties for the


controls
3. Write the code

4. Test the code


Controls
❑ also called objects.
❑ a component on a form used to display information
or accept user input.

Examples:
✓ Label
✓ Button
✓ TextBox
✓ ListBox
✓ CheckBox
✓ Etc.
Here are some of C# controls:

CONTROL NAME FUNCTION


Label Displays text or message for the use of other controls. It
can only show an output and cannot accept users input.
Button Executes a specific action and performs commands
written in the code editor.
TextBox Displays text same with the label but unlike the label,
this will allow input from the users.
ListBox Show a list of choices that is presented vertically in a
single column.
CheckBox Used for tuning on or off a particular feature of a
program.
OptionBox Used to present options that can be selected in a group.
ComboBox Shows choices through a drop-down menu
Here are some of C# controls:

CONTROL NAME FUNCTION


Image Creates a box that displays pictures. It allows resizing of
pictures.
PictureBox Create a box that displays pictures with a fixed size. It
does not allow resizing of pictures.
Shape Draws different shapes, such as rectangle, circle, square
and the like.

Toolbox
❑ Is part of the IDE which found on the left side of the window.
❑ To open Toolbox, choose View > Toolbox from the menu bar, or
press Ctrl+Alt+X.
CONTROL ICON/IMAGE CONTROL ICON/IMAGE
Label OptionBox
A
Button ComboBox
ab
TextBox Image
abl
ListBox PictureBox

CheckBox Shape
Naming convention
1 It should not start with numbers.

2 The underscore symbol can only be used.

3 It must not include a space or a blank.

4 Start each word with capital letters. Ex: FirstName

5 Use verb for function and method name. Ex: CloseMenu

6 Use prefix “I”, in declaring the name for interface.


Some object prefix
PREFIX
cbo
OBJECT TYPE OR CONTROL
ComboBox
EXAMPLE
cboMONTH
chk CheckBox chkJOB
btn Button btnLOGIN
lbl Label lblNAME
lst ListBox lstGRADES
opt OptionBox optGENDER
pic PictureBox picPROFILE
shp Shape shpRECTANGLE
txt TextBox txtNAME
img Image imgBACKGROUND
frm Form frmFRONT
mnu Menu mnuITEMS
rdb RadioButton rdbMALE

You might also like