180 likes | 266 Views
المحاضرة الثالثة. مكونات البيزك المرئي Visual Basic Components Cont. By Hitham M. Abo Bakr. In the Previous Lecture . VB 6 Controls. Form Label Textbox Radio button check box listboxes Timers Scrollbar. Forms. Form events Load resize. Close, Max/Restore, Minimize. Caption.
E N D
المحاضرة الثالثة مكونات البيزك المرئي Visual Basic Components Cont. By Hitham M. Abo Bakr
VB 6 Controls • Form • Label • Textbox • Radio button • check box • listboxes • Timers • Scrollbar
Forms • Form events • Load • resize Close, Max/Restore, Minimize Caption • Form properties • Top • Height • Left • Width • Name • Enabled • Visible • Load form • What is twip?
Label • Label Properties • Autosize • Wordwrap • Alignment • Appearance • Font • BackColor and foreColor • Caption
TextBox • Text adding in the Run Time / design time • Multiline • Scrollbars • Events • Change text
In This Lecture listboxes Timers Scrollbar
Listbox • We will take about: • Style • AddList at • Design time • Run Time • Retrieve selected items
ListBox properties List Multiselect Listcount Listindex Selected Clear Removeitem
ComboBox properties List Listcount Listindex
Timer control • Hidden control • Interval • Tick event • Enabled or not
Timer example – a clock Private Sub Timer1_Timer() Dim currentTime As Date currentTime = Now() Label1.Caption = currentTime End Sub
Timer exercise • Program an animated ball which moves across a window • Have a 'Shape' control and a timer • Each tick event of the timer moves the shape: shape1.left = shape1.left + speed • Make it bounce