By Kardi Teknomo, PhD .


< Previous | Next | VB Tutorial | Contents >

VB Events and Coordinates

In this section of VB tutorial, you will learn about coordinate system in VB and how to use Event procedure

1. Start a new VB Standard Exe project
2. Drag and drop Label
3. Set AutoSize property of the label1 = True
4. Click the form, click to the MouseMove event
5. Type:

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Caption = "(X, Y) = " & X & ", " & Y
End Sub

6. Run the program

Visual basic is an event oriented program. It will wait for your event to response.

< Previous | Next | VB Tutorial | Contents >

Rate this tutorial or give your comments about this tutorial

This tutorial is copyrighted .