230 likes | 465 Views
المحاضرة الثانية. مكونات البيزك المرئي Visual Basic Components By Hitham M. Abo Bakr. Course Website. http://www.hmabobakr.name.eg/userdownloads/VB/VB_Programming.html Or http://www.hmabobakr.name.eg Then select Student area and then select computer and VB Language Course.
E N D
المحاضرة الثانية مكونات البيزك المرئي Visual Basic Components By Hitham M. Abo Bakr
Course Website http://www.hmabobakr.name.eg/userdownloads/VB/VB_Programming.html Or http://www.hmabobakr.name.eg Then select Student area and then select computer and VB Language Course
To access the WebSite http://www.hmabobakr.name.eg
VB 6 Controls • Form • Label • Textbox • Scrollbar • Radio button • check box • listboxes • timers
Forms • Form events • Load • resize Close, Max/Restore, Minimize Caption • Form properties • Top • Height • Left • Width • Name • Enabled • Visible • Load form • What is twip?
Methods and Events Every Control has its properties variables that change its Appearance, beside that, there is some methods that can change its appearance and do some features to this control Ex.: Form.printform, drag , Move, Set focus,….
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
Listbox • We will take about: • Style • AddList at • Design time • RunTime • Retrieve selected items
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