Futurebasic/Language/Reference/on dialog


Statement edit

✔ Appearance ✔ Standard ✔ Console

Syntax edit

ON DIALOG {FN userFunction|GOSUB{lineNumber|"stmtLabel"}} 

Description edit

This statement designates a particular function or subroutine as a dialog-event handling routine. A dialog-event handling routine is called in response to a number of different kinds of user actions and internal events; see the DIALOG function for more information. After a dialog event occurs, FB does not call your designated routine immediately. Instead, your program continues executing until a HANDLEEVENTS statement is reached. At that time, HANDLEEVENTS will call your designated routine once for each dialog event that occurred; your designated routine should examine the DIALOG(0) and DIALOG(evnt) functions to get information about the event. If you have not designated any dialog-event handling routine, FB ignores events of this kind.

Note: If you use the ON DIALOG FN userFunction syntax, then userFunction must refer to a function which was defined or prototyped at an earlier location in the source code. Your dialog-event handling function should not take any parameters, nor return a result.

See Also edit