How to Use Visual Basic Express
1. Download the free Visual Basic Express 2008 from the Microsoft Visual Studio Download page listed in the Resources section and follow the instructions to install the software.
2. Click on 'Start,' then 'All Programs' and locate the installed program listed as Microsoft Visual Basic 2008 Express Edition. Click on this to start the program.
3. Click on 'File,' then 'New Project' and choose 'Windows Forms Application.' In the empty box at the bottom, provide a name like 'My First VB Program' and click 'OK.'
4. Display the Properties pane on the right by clicking on 'View,' then 'Properties Window.' The Tool pane should be showing on the left. If not, display it by repeating this step and clicking on 'Toolbox' in the View drop down menu.
5. Double-click the Label tool in the Toolbox to place a label on the form you see. In the Properties pane, double-click on the Label Text property and type 'Hello there, what is your name?'
6. Double-click on the Textbox control, and then drag it down below the Label you just created. Change the Width (under Size) property to 275. Double-click on the Button tool and then drag it below the Textbox. Change the Button Text property to 'Continue.'
7. Double-click on the Continue button to open the Code view. Type the following text between the line that begins 'Private Sub Button1_Click' and the 'End Sub' line:
Dim MyName As String
MyName = TextBox1.Text
TextBox1.Text = 'Glad to meet you, ' & MyName & '. My name is Zork.'
8. Click 'Debug,' then 'Start Debugging' to test the program. If you entered the code correctly, you should see a dialog.
0 comments:
Post a Comment