Graphical User Interface
Graphical User Interface
Graphical User Interface
USER
INTERFACE
CONCEPT
LESSON CONTENT
• Graphical User Interface Definitions and Concepts
• Creating Graphical User Interfaces
• The Windows Form
• Event Handling
• Working with labels, TextBoxes and Buttons
• GroupBoxes and Panels
• Checkboxes and radioButtons
• Adding Menus and Other Control
LESSON OBJECTIVES
COMMON EVENT
Click Generated when user click the control
Case Study
Create a windows
application that accepts
message from the user
(using Textbox). The
PasswordChar is set to
mask each character typed
by the user. On a click
button (btnShow) the
message will be decrypted.
The decrypted message will
be shown using a label
control.
Double click the button and type below codes:
lblMessage.Text = txtMessage.Text
GROUPBOXES AND PANELS
End Sub
EXIT
Private Sub
ExitToolStripMenuItem_Click(sender As Object,
e As EventArgs) Handles
ExitToolStripMenuItem.Click
End
End Sub
Private Sub ClearColor()
RedToolStripMenuItem.Checked = False
YellowToolStripMenuItem.Checked
= False
BlueToolStripMenuItem.Checked =
False
End Sub
RED
ClearColor()
lblDisplay.ForeColor = Color.Red
RedToolStripMenuItem.Checked = True
BLUE
ClearColor()
lblDisplay.ForeColor = Color.Blue
BlueToolStripMenuItem.Checked = True
YELLOW
ClearColor()
lblDisplay.ForeColor = Color.Yellow
YellowToolStripMenuItem.Checked = True
Private Sub ClearFont()
TimesNewRomanToolStripMenuItem.Checked =
False
CourierToolStripMenuItem.Checked = False
ComicSansMSToolStripMenuItem.Checked =
False
End Sub
TIMES NEW ROMAN
ClearFont()
TimesNewRomanToolStripMenuItem.Checked =
False
lblDisplay.Font = New Font("Times New
Roman", 30, lblDisplay.Font.Style)
COURIER
ClearFont()
CourierToolStripMenuItem.Checked =
False
lblDisplay.Font = New Font("Courier",
30, lblDisplay.Font.Style)