3.1 The Concept of Event-Driven Programming
Visual Basic 2022 is an event-driven programming language, meaning that the code is executed in response to events triggered by the user like clicking the mouse or pressing a key on the keyboard. Some other events are selecting an item from a drop-down list, typing some words into a text box and more. It may also be an event that responds to some other events. Some of the common events in Visual Basic 2022 are load, click, double-click, drag-drop, keypress and more.
Every control you place on the form has a set of events associate with it. To view the events, double-click the control on the form to enter the code window. The default event will appear at the top right side of the code window. You must click the default event to view other events associated with the control. The code appears on the left side is the event procedure associated with the load event. Figure 3.1 illustrates the event procedure Load associated with the Form and Figure 3.2 shows the events associated with the button.
Figure 3.1: Events associated with Form
Figure 3.2: Events associated with the button
0 Comments
Thanks for your comment.
i will reply you soon.