Introduction to VB programming By Dr. John Abraham For students in 6303
A console program Start Visual Studio 2005 Click create Project Click project type Visual Basic (left side) Click on console application Give it a name and Press OK Change the name of the module
VB console program Declare global variables and constants Write subroutines and functions Must have a subroutine called main Pass parameters properly. Observe Byval and byRef Run the program
Writing to a file Imports system.io Declare a variable of type io.streamwriter Dim outfile as io.streamwriter Assign a physical filename to create Outfile=io.file.createText(“c:\outfile.txt”) Write to file Outputfile.writeLine(“this is a sample”) Sample program - carpet
Windows program Click on Windows application instead of console Learn how to use toolbox Learn to set properties Learn to write code for events Learn Looping for this example (Interest program)
Multiple Forms Learn how to manipulate more than one form Making visible invisible Set focus Learn how to add pictures Sample program: cards