View contents of this chapter

Common Control Events

This section will familiarize you with some common events that can occur for the controls.

  • Activate: This event occurs when a form becomes the active window.
  • Click: This event occurs when the user presses and then releases a mouse button over an object.
  • Change: This event occurs when the user changed the text in a text box.
  • DblClick: This event occurs when the user double clicks an object.
  • Deactivate: This event occurs when another form gets the focus.

Play Sound Both the Activate and Deactivate events occur when the user selects a different form.

  • Initialize: This event occurs when the form is first generated.
  • Load: It occurs when a form is loaded into active memory.
  • Mouse Down, Mouse Up: These events occur when the user presses (MouseDown) or releases (MouseUp) a mouse button.
  • Paint: It occurs when part or all of an object is exposed after being moved or enlarged, or after a window that was covering the object has been moved.
  • Unload: This event occurs when a form is about to be removed from the screen.

Play Sound

In this chapter, we explained you how the components of a Visual Basic program go together, especially about the controls and their associated properties, methods, and events. Now you should understand controls, properties, and events better than before. An event procedure must exist for each control and event that you want to respond to in your program. Without an event procedure, an event gets ignored.



© Universal Teacher Publications        INDEX Previous Screen Next Screen