Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering


You are here: Visual Basic > Advanced VB6 tutorial > Chapter 3

Mouse Events Compared With Click and DblClick in VB6

Programming mouse-related events is a common task within most applications. This is because the mouse is the most common device for user interaction within a Windows-based user interface.

In particular, the Click event is possibly the most commonly programmed event in a VB application. All the mouse events except MouseMove are directly related to the action of one of the mouse buttons.

For controls that support mouse events, the click-related events take place in the following order:

When the user clicks once over Label and TextBox controls:

1. MouseDown
2. MouseUp
3. Click

When the user clicks once over a CommandButton control:

1. MouseDown
2. Click
3. MouseUp

When the user double-clicks over Label and TextBox controls:

1. MouseDown
2. MouseUp
3. Click
4. DblClick
5. MouseUp

When the user double-clicks over a CommandButton, no DoubleClick event fires (the CommandButton does not support a DoubleClick event). Instead, the CommandButton receives (as you might imagine):

1. MouseDown
2. Click
3. MouseUp
4. MouseDown
5. Click
6. MouseUp


  

 

<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved