See Also: Object, Activating Views on Start-Up
To begin a new user-interface level.
Start_UI [object]
object The name of an existing user-interface object.
The Start_UI command is the beginning of the non-procedural execution of a DataFlex program. The Start_UI command is a loop that waits for keyboard, mouse and timer events, and sends messages based upon the event. The events are always represented as messages, such as Key, Mouse_Down and Switch. Each user event is translated into a message.
The Start_UI command is typically used once in a program, after all of the program's objects are created.
Each message returns a value, and execution remains in the non-procedural mode until the return value of any of the messages is non-zero. The return value may be generated by the commands Function_Return, Procedure_Return or as the result of a built-in message. After the termination of the Start_UI command, execution continues with the next command line in the program. Typically this UI loop will not be stopped until the program is terminated.
Object is an optional parameter in which an object to activate prior to the beginning of the Start_UI may be named. The command will send activate to the named object, causing it to become the focus. It is suggested that you not use this technique. If you wish to activate an object, explicitly send the activate message.
Send Activate of oMyPanel
Start_UI
The Start_UI command will not allow the desktop to be the focus. If the focus is the desktop prior or at any time during the execution of the Start_UI, the loop will terminate.
Execution of the program while in the non-procedural mode is typically under the end user's control. Users will navigate the system by sending keyboard or mouse events to objects through the Start_UI event handler.
The Start_UI command gets input from the object that is the focus. The input will be either the single-key type or a whole string of information. In either case, the terminating key is sent to the key translation routine to test for any accelerator-key definitions. If a key is defined, then the message on the On_Key command line for that key is sent; otherwise the key message is sent to the focus.