2/24/09
This thread from 3 days ago is about preventing the user from closing a dialog with "X" or using ALT+F4
PostQuitMessage should never have been used.
Solutions are in post #11.
--------------------------------------------------------------------------------------------------
What is wrong with this code?
If MSGBOX is placed before PostQuitMessage it works.
If placed after PostQuitMessage the msgbox does not display and dialog can not be closed even if threads have finished.
Don't plan on using the MSGBOX, but curious.
Code to prevent user from closing dialog before all threads have finished.
This thread from 3 days ago is about preventing the user from closing a dialog with "X" or using ALT+F4
PostQuitMessage should never have been used.
Solutions are in post #11.
--------------------------------------------------------------------------------------------------
What is wrong with this code?
If MSGBOX is placed before PostQuitMessage it works.
If placed after PostQuitMessage the msgbox does not display and dialog can not be closed even if threads have finished.
Don't plan on using the MSGBOX, but curious.
Code to prevent user from closing dialog before all threads have finished.
Code:
CASE %WM_SYSCOMMAND IF THREADCOUNT > 1 THEN PostQuitMessage 0 ? "Threads still active" + STR$(THREADCOUNT) 'doesn't display, program can't end FUNCTION =1 END IF
Comment