How can I close all the Thread
Posted: Wed Jul 31, 2019 10:16 am
Hello Roger
How can I close all the Thread that are created to the windows that are open
How can I close all the Thread that are created to the windows that are open
Donnay Software Web Forums
http://donnay-software.com/DONNAY/
Code: Select all
FUNCTION CloseAllWindows()
LOCAL aChildList, i
aChildList := MainWindow():drawingArea:childList()
FOR i := 1 TO Len(aChildList)
PostAppEvent(xbeP_Close,,,aChildList[i])
Sleep(50)
NEXT
RETURN nil
rdonnay wrote:Code: Select all
FUNCTION CloseAllWindows() LOCAL aChildList, i aChildList := MainWindow():drawingArea:childList() FOR i := 1 TO Len(aChildList) PostAppEvent(xbeP_Close,,,aChildList[i]) Sleep(50) NEXT RETURN nil
Do you have a Get-Set function that points to your main dialog window?function MainWindow () does not exist
Code: Select all
// Main dialog window
DCREAD GUI EVAL {|oDlg|MainWindow(oDlg)}
FUNCTION MainWindow( oDlg )
STATIC soDlg
IF Valtype(oDlg) == 'O'
soDlg := oDlg
ENDIF
RETURN soDlg
rdonnay wrote:Do you have a Get-Set function that points to your main dialog window?function MainWindow () does not exist
Do you know what I mean by this?
Code: Select all
// Main dialog window DCREAD GUI EVAL {|oDlg|MainWindow(oDlg)} FUNCTION MainWindow( oDlg ) STATIC soDlg IF Valtype(oDlg) == 'O' soDlg := oDlg ENDIF RETURN soDlg