Gary Beene's VB Tutor | VB Primer Links | VS Mag | Extreme VB | MVPS VB-net | VB About.com | Duane Moore's VB Links | VB6 Database Pgmg |
Open VB IDE
after Patricia Hartman's Teach Yourself Visual Basic 6Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X as Integer, Y as Integer) End Sub
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X as Integer, Y as Integer) Beep MsgBox "BUTTON= " + Format$(Button) + ", X= " + Format$(X) + ", _ Y= " + Format$(Y) End Sub
Notes on syntax
Private Sub Command1_Click() If WeekDay(Now) = vbSunday Then Form1.Print "Eat " & _ "at Joe's" If WeekDay(Now) = vbMonday Then Form1.Print "Eat " & _ "at Tom's" End Sub
Private Sub Command1_Click() Dim lngCounter AS long ' Declare the counter variable For lngCounter = 1 to 1000 ' Loop Debug.Print lngCounter Next lngCounter End Sub
Dim intPrice1 As Integer, intPrice2 As Integer, intPrice3 As Integer
Dim intPrice1 As Integer: Dim intPrice2 As Integer
Control | Prefix | Variable | Prefix |
---|---|---|---|
Check Box | chk | Boolean | bin |
Combo Box | cbo | Currency | cur |
Command Button | cmd | Double | dbl |
Common Dialog Control | dig | Date & Time | dat |
Data | dat | Long | lng |
Form | frm | Integer | int |
Frame | fra | Single | sng |
Grid | grd | String | str |
Image | img | Variant | var |
Label | Ibl | ||
List Box | lst | ||
Menu | mnu | ||
Option Button | opt | ||
Picture | pic | ||
Shape | shp | ||
Text Box | txt | ||
Timer | tmr |
back to Index | back to Links |