Click or drag to resize

DialogWindow.ExecModal Method

X#
Allows the programmer greater control over Windows message handling in dialog windows.

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD ExecModal() AS USUAL
Request Example View Source

Return Value

Type: Usual
Remarks
Normally a dialog window will cause program execution to pause when the window is shown and then continue once the window is closed. The default behavior of ExecModal( ) maintains the expected behavior. However the programmer can create a new class which inherits from DialogWindow and implement a new ExecModal() method so as to change this behavior.
Examples
As an example the programmer could use the following version which performs no action:
X#
1METHOD ExecModal() CLASS DialogWindow
2RETURN NIL
Now the program control comes back immediately after calling the Show() method. This is very useful for cases where your code wants to control the windows dispatcher loop with the function ApplicationExec(EXECWHILEEVENT):
X#
 1METHOD xyz() CLASS xyz
 2LOCAL oPDlg AS ProgressDialog // inherit from DialogWindow
 3
 4oPDlg := ProgressDialog{SELF, "Processing is going on!"}
 5oPDlg:Count := oServer:Reccount
 6oPDlg:Show()
 7
 8//ProgressDialog is modal, the user can do
 9// nothing during the processing other than what
10// your code permits.
11//In this example you can abort the loop.
12
13oServer:GoTop()
14
15DO WHILE oServer:EOF
16IF ! oPDlg:STEP() //FALSE if abort button is pressed
17EXIT
18ENDIF
19//do something
20oServer:Skip()
21ENDDO
22
23oPDlg:EndDialog()
See Also