IT 236 -- 6/13/06

To Notes

Summary for IT 236 on 6/13/06

 

Go over IT 236 course web site

 

About VB.NET.

 

Creating a ClickCounter Application

  1. Invoke the .NET IDE (Interactive Development Environment). By double clicking on the .Microsoft Visual Studio .NET 2003 Icon. In the computer labs, Select Start >> All Programs >> Microsoft Visual Studio .NET 2003 >> Microsoft Visual Studio .NET 2003

  2. Close the Start Page if it appears by clicking on the X to the right of the Start Page Tab.

  3. Select File >> New >> Project. Browse to the correct folder (lower right), say IT236. Make sure that Visual Basic Projects (upper left) and Windows Application (upper right) are selected. Enter the name of the project, ClickCounter. Click OK.

  4. From the ToolBox, drag a TextBox control onto the form. The name of the textbox will be TextBox.

  5. In the Properties Window for the textbox, change the name to txtNumberOfClicks. Also change its Text property from TextBox1 to "0".

  6. From the ToolBox, drag a Button control onto the form. The name of the button will be Button1.

  7. In the Properties Window for the button, change the name to btnButton. Also change its Text property from Button1 to "Push Me".

  8. Double click the button to produce the header and terminator for the Click event handler:

    Private Sub btnButton_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles btnButton.Click

    End Sub

  9. Add the body of the event handler so the code looks like this:

    Private Sub btnButton_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles btnButton.Click

        txtNumberOfClicks.Text = txtNumberOfClicks.Text + 1
    End Sub

  10. Run the application by selecting Debug and Start.

 

Important Features of the Visual Studio .NET

 

Running the VB.NET Examples

 

A HelloWorld Console Application

 

A HelloWorld Windows Application

 

Submitting Projects

 

The Greeter Project

 

Review of Objects