What is an event-driven??
Users questions:
Experts answer: common event. Event: It is an object able to recognize and to respond to external "stimulus" (Action) Note: The event defined by the user, while the methods defined by the system! ! . Each object has a series of predefined events. Events by the user, system or application code that triggered the event. Event fatHealth will be self-executing the corresponding event procedure code (if any). Program design major tasks: time course of the preparation of program code. Open the code editor window: a "project" * "View Code" 2 Double-click the object 1.Click the event. mouse click event. Form Click event procedure of the gridType:. PrivateSubForm_Click () Note: Private Private Sub process Form Form _Click mouse click event PrivateSub means subroutine. 'Handling of the event statement. EndSub Note: EndSub meaningEnd of the subroutine. PrivateSub event procedure name (parameter). 'Handling of the event statement. EndSub. Note: Event Procedure name: object name _ the event name. Example: cmdOK_Click2.DblClick event. Mouse double-click events, commonly used in the direct implementation of the ordersOrder, more than the menu or command button, faster and easier. DblClick form format of the event:. PrivateSubForm_DblClick (). 'Handling of the event statement. EndSub. Note: In the DblClick event occurs, Click,MouseDown, MouseUp events occur with VisualBasic applications work 1, VisualBasic adopt the event-driven applications that work 2. The object of three elements: properties, methods, events, 3. Attribute is an object ofData, method is the object moves, the incident was an object to respond to four. The incident was a form or control, identify and respond to action. 5. Each form and control event has a predefined set of typical ways of working one. Start your application, load and display the form 2. Form (or the controls on a form) to receive events 3.The implementation of the corresponding event procedure code 4. The application wait for the next event on the events and event processes of the initiators of the event: 1. Users (such as a keyboard or mouse operation) 2. Systems (such as the timer event) 3. Code ( For example, when code is loaded when the Load form event). Some of the event will be accompanied byOther incidents. Each event does not necessarily have a corresponding event procedure code commonly used object properties of the basic properties of the object, there are two 1. Properties window lists the properties of 2. Only through the program code to set properties, the Properties window could not be found. ************************************************************ That want to object to respond to events, the must be driven, "drive" refers to the driver and the code