Changes

Event Sequences in Visual Basic VB6

914 bytes added, 16:06, 17 January 2008
The following lines were added (+) and removed (-):
* When you click on a control other than the current one, the MouseDown event happens BEFORE the previous control's LostFocus event, and BEFORE the new control's GotFocus event. One valuable use of this is that you can detect the user clicking the Cancel button and programatically avoid running data validation in the LostFocus event of whatever field they were in before clicking Cancel.* The Click event for a Command button happens BEFORE the MouseUp event, while for most other controls, it happens AFTER the MouseUp event.* A number of controls have events that happen BEFORE the GotFocus event. For example, you can build or adjust the list of a ComboBox in the DropDown event before GotFocus. In the Grid control, you get a RowColChange event before the GotFocus event.* When you click in a TextBox, the SelStart property is set (based on the position of the mouse) before ANY other event takes place.
Bureaucrat, administrator
16,192
edits