Professional Documents
Culture Documents
P1 Key Features of Event Driven Programming: Events
P1 Key Features of Event Driven Programming: Events
P1 Key Features of Event Driven Programming: Events
Programming
Events
Events are actions that the program responds to. A simple event can be a
mouse click on a control.
Event Handlers
An event handler is the code that runs when an event occurs known as
sub routines in Visual basics. Event handlers are executed when a trigger
occurs done by the user. A button on a form is an object and when that is
pressed it will trigger the event handler which is the code written for the
program.
Trigger Functions
These are functions that decides which code runs when an event happens.
Event Loops
These are built into the program language and they are used to check if and
event has occurred. Event loops continually look for events waiting to happen.
Event loops can detect a button click, arrival of a packet over a local network or
even file creation.
Form Components
Forms contain controls known as objects that experience events. A form can
contain user interface components such as labels, buttons, list boxes, radio
buttons and textboxes. Forms are used to provide an input tool for users that is
functional and approachable.