Pemrograman VisualMinggu …8… Page 1 MINGGU Ke Delapan Pemrograman Visual Pokok Bahasan:...
-
Upload
lizette-breach -
Category
Documents
-
view
214 -
download
0
Transcript of Pemrograman VisualMinggu …8… Page 1 MINGGU Ke Delapan Pemrograman Visual Pokok Bahasan:...
Minggu …8… Page 1
Pemrograman Visual
MINGGU Ke Delapan
Pemrograman VisualPemrograman Visual
Pokok Bahasan:Graphical User Interface
Tujuan Instruksional Khusus:Mahasiswa dapat menjelaskan dan mengaplikasikan Graphical User Interface pada Visual Basic 2008
Referensi:Deitel Deitel, Visual Basic 2008 (2009), How to Program, Prentice Hall. Chapter 14
Pemrograman Visual Minggu …8… Page 2
Agenda• Some Basic GUI Components• Common Properties and Methods• Label, TextBox, Button• Check Box & Radio Button• Mouse Event Handling• Keyboard Event Handling• GroupBox & Panels• Menus• List Box, Check List Box, Combo Box • List Box Properties, Methods & Events• Combo Box Properties & Events• Tab Control Properties & Events• MDI Forms Properties & Events
Pemrograman Visual Minggu …8… Page 3
Some Basic GUI Components
• Label• TextBox• Button• CheckBox• ComboBox• ListBox• Panel• Scrollbar
Pemrograman Visual Minggu …8… Page 4
Common Properties & Methods• Common Properties
– BackColor
– BackgroundImage
– Enabled
– Foccused
– Font
– ForeColor
– TabIndex
– TabStop
– Text
– TextAllign
– Visible
• Common Methods– Focus– Hide– Show
Pemrograman Visual Minggu …8… Page 5
Labels, TextBox, Buttons• Label Properties
– Font– Text– TextAlign
• TextBox Properties & Events– TextBox Properties
• AcceptReturn• Multiline• PasswordChar• ReadOnly• ScrollBars
– TextBox Events• TextChanged
• Button Properties & Events– Button Properties
• Text– Button Events
• Click
Pemrograman Visual Minggu …8… Page 6
CheckBox & RadioButton
• CheckBox– Properties
• Checked• CheckState• Text
– Events• CheckedChanged• CheckStateChanged
• RadioButton– Properties
• Checked• Text
– Events• Click• CheckedChanged
Pemrograman Visual Minggu …8… Page 7
Mouse Event Handling
• Mouse Events– MouseDown– MouseHover– MouseMove– MouseUp
• Mouse Event Arguments– Button– Clicks– X– Y
Pemrograman Visual Minggu …8… Page 8
Keyboard-Event Handling
• Key Events– KeyDown– KeyUp– KeyPress
• Key Event Arguments Properties– KeyChar– Handled– Alt– Control– Shift– KeyCode– KeyData– KeyValue– Modifiers
Pemrograman Visual Minggu …8… Page 9
GroupBox & Panel
• GroupBox Properties– Control– Text
• Panel Properties– AutoScroll– BorderStyle– Controls
Pemrograman Visual Minggu …8… Page 10
Menus
Pemrograman Visual Minggu …8… Page 11
Menus
• Membuat Menu: Menu – ToolBox – MenuStrip
• Membuat Shortcut: Tambahkan tanda &
• Membuat Shortcut Khusus: e.g: Ctrl + F1
Pilih properties ShortcutKeys
Pemrograman Visual Minggu …8… Page 12
Main Menu & MenuItem Properties & Event
• MainMenu Properties– MenuItems– RightToLeft
• MenuItem Properties– Checked– Index– MenuItems– RadioCheck– Shortcut– Text
• Common Event – Click
Pemrograman Visual Minggu …8… Page 13
Example of Menu & Tasks• Control
• TextBox
• Enabled
• Disabled
• Clear Text Box
• Label Resul Clear
• Characteristics
• Type
• Bold
• Italics
• Underline
• Color
• Blue
• Yellow
Pemrograman Visual Minggu …8… Page 14
ListBox & CheckedListBox
Pemrograman Visual Minggu …8… Page 15
ListBox Properties, Methods & Events
• Common Properties:– Items– MultiColumn– SelectedIndex– SelectedIndices– SelectedItem– SelectedItems– SelectionMode– Sorted
• Common Method:– GetSelected
• Common Event:– SelectedIndexChanged
Pemrograman Visual Minggu …8… Page 16
Example of ListBox & Task
Pemrograman Visual Minggu …8… Page 17
ComboBox
Pemrograman Visual Minggu …8… Page 18
ComboBox Properties & Event
• Common Properties:– DropDownStyle– Items– MaxDropDownItems– SelectedIndex– Sorted
• Common Events:– SelectedIndexChanged
Pemrograman Visual Minggu …8… Page 19
Tab Control
Pemrograman Visual Minggu …8… Page 20
TabControl Properties & Events
• Common Properties:– ImageList– ItemSize– MultiLine– SelectedIndex– SelectedTab– TabCount– TabPages
• Common Event:– SelectedIndexChanged
Pemrograman Visual Minggu …8… Page 21
MDI Form Properties & Events
• Common MDI Child Properties:– IsMdiChild– Mdiparent
• Common MDI Parent Properties:– ActiveMdiChild– IsMdiContainer– MdiChildren
• Common Method:– LayoutMdi
• Common Event:– MdiChildActivate
Pemrograman Visual Minggu …8… Page 22
Questions
&
Answers
Pemrograman Visual Minggu …8… Page 23
Thank You