Changes

Jump to: navigation, search

Understanding Visual Basic Events

7 bytes removed, 20:04, 19 July 2007
Visual Event Triggers
Instead of a procedural approach to programming, applications are now ''event driven''. In essence, the developer defines what the user interface is to look like, and then defines subroutines which will be called when particular events are triggered. For example, the Visual Basic programmer might create a Form containing a number of Buttons. For each Button, the programmer will define the Visual Basic code to be executed when a ''Click'' event is triggered on each button. When the application runs, an ''event loop'' sits in the background and waits for an event to be triggered in the application. Once an event is triggered (such as button click or a a keystroke in a text field) the event loop looks at the object from which the event was triggered to see if an event handler has been defined by the developer for that particular event type. If a handler has been defined, that subroutine is executed and the event loop continues to loop waiting for the next event to be triggered.
== Visual Event Triggers ==
There are a number of ways events can be triggered:

Navigation menu