Visual+Basic

Visual Basic

Unit 1 - Input/Output


 * Form Properties:
 * Need Form1.visible = true to print to form
 * Change text color as code:
 * form1.forecolor = vbred
 * Label Properties:
 * Notice the Word Wrap property
 * Label1.Caption = "Print words like this"
 * Label1.Caption = "Mix words and " & a & "variables like this"
 * Format like this: Label1.caption = "Your pay" & format(pay, "currency")
 * To place text on two lines, separate with vbCrLf: Label1.Caption = "Line1" & vbCrLf & "Line2"
 * Command Properties:
 * If you use color, need to change Style to graphical
 * Image Properties:
 * You should cite your image in a comment (remember easy bib!)
 * You can enter image two ways - thru menu at picture (set stretech = true) or thru code:
 * Image1.Picture = Loadpicture("\\data\student\20xx\username\My Pictures\imagename.jpg")
 * Text Box:
 * By definition, a value entered will be text, to turn it numeric:
 * a = val(text1.text)
 * Color Codes


 * ** Visual Basic Colors: ** || vbred, vbBlack, vbGreen, vbYellow, vbBlue, vbMagenta, vbWhite, vbCyan ||

Unit 2 - Conditionals

Unit 3 - Loops
 * Timers:
 * timer1.enable = true
 * timer1.interval = 1000 'equals 1 second

Unit 4 - Functions and Subroutines
 * LightBot Game @http://armorgames.com/play/2205/light-bot