Form event
Initialize: Initialize the application, set the initial variable value, only trigger once in the life cycle of the application, triggered before the form LOAD event.
Load: Form loading, assigns the default value to the control in the form, which can happen multiple times.
Activate: Activate the event, the Load event is not immediately captured, and the user needs to activate the event.
Queryunload: Query uninstall.
UNLOAD: Uninstall the form, returns the resource of the form to the operating system.
Terminate: Terminate the event.
Click / DBLClick: In addition to the title bar, click / Double click on the invalid control on the form of the form, and the event will be triggered.
Resize: This event occurs when the form size is changed.
MouseDown: This event occurs when you hold down the mouse.
MouseMove: This event occurs when moving the mouse on the form.
MouseUp: This event occurs when the mouse is released
Control event
Click: Click the control to trigger the event, almost every control has this event.
KeyPress: When the control with this event has a focus, the event can be used to capture the (except function key) key of the user. This event can immediately test whether the keystroke is valid, or set its format when typing characters. This event has an integer parameter keyascii for the ASCII value of the button.
KeyDown / Keyup: Capture the keyssed keys such as the ASCII value, such as function keys, cursor keys. For controls with focus, the user will trigger the event each time, including the button including Shift (0), Ctrl (1), the Alt (2) button. The KeyDown event occurs at least once before the Keyup event.
Application coding
To perform application coding in VB requires three main features: attribute / method / event. Set the properties and call methods to use ".".