EVENT Identifier ( [ Parameter #1 [ , Parameter #2 ... ] ) [ AS Boolean ]
This declares a class event. This event is raised by a function call.
You can specify if the event handler returns a boolean value. In that case, a TRUE
return value indicates that the event has been cancelled.
EVENT BeforeSend(Data AS String) AS Boolean ... ' Raises the event IF BeforeSend("MyData") THEN PRINT "Canceled !" ENDIFBy default, "instancename_eventname" is the name of the method called in the event listener when an event is raised. For example, if you have a class called FancyButton and you throw an event called FancyClick, and in your form called FMain you have a FancyButton object named MyButton, the event handler method would look like this:
PUBLIC SUB MyButton_FancyClick(your args...)
The default behavior can be changed somewhat: see Attach and other methods of the static Object class, as well as Control Groups whose information is applicable to any event-raising class.