Following the mouse
v
Recall that VB, like most other modern environments for building
graphical user interfaces, uses an event model.
v
For example, we generate an event (and call an appropriate
procedure) whenever the user clicks on a button.
v
Whenever the mouse moves, VB generates a “mouse move
event”
Private Sub Form_MouseMove(button As Integer, shift As Integer,
x As Single, y As Single)
Cls
If button = vbLeftButton Then
Circle (x, y), 500, vbRed
End If
End Sub