App.Exec Method (Long, Object) | |
Start the event handling loop for the application.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD Exec(
kExecType AS LONG,
uObject AS Object
) AS LONG
public virtual int Exec(
int kExecType,
Object uObject
)
Request Example
View SourceParameters
- kExecType
- Type: Long
The type of event handling loop to start, specified as one of the following constants
Constant | Description |
---|
EXECNORMAL |
Tells the system to continue to execute the application until either the user closes it
(by selecting the Close menu command or using the standard Windows accelerator Alt+F4)
or the application decides to close by deliberately invoking the App:Quit() method.
When the application terminates, the thread of control exits from App:Exec() to the
next statement in your code. This is the default.
|
EXECWHILEEVENT |
Tells the system to continue to execute the application only while there are still events queued.
Once the system has dispatched the last event in the queue, the thread of control exits from App:Exec().
This gives you the opportunity to do some processing and then start another event loop by invoking
App:Exec() again. You should use this mechanism when you want to do some background processing
while the application is idle.
|
- uObject
- Type: Object
The object (usually a dialogwindow) for which to process the message
Return Value
Type:
Long
A value of 0 indicates normal termination (no errors). A non-zero value indicates abnormal termination.
Remarks
Normally, the event handling loop for the application continues looping until there are no more EventContext objects. It can also terminate upon calling App:Quit().
Tip |
---|
Make sure that you show at least one window object before calling App:Exec(). |
See Also