I have a simple program with one DDT Dialog box. What is the
correct way to handle a user clicking on the X on the caption bar
to close it ? This is how I'm handling it at the moment :-
' Display the mail dialog modeless to allow program execution to continue.
DIALOG SHOW MODELESS hDlg TO MainResult
' Code to get network information etc.
' Loop allowing dialog events until the MainResult is set or no dialogs !
DO
DIALOG DOEVENTS TO Count
LOOP WHILE MainResult = 0 AND Count > 0
EXIT FUNCTION 'Exit PBMAIN
This works - but the manual states that DOEVENT shouldn't be
called if there are no Dialogs and the user may have closed the
one and only Dialog !!
------------------
Colin Mair
correct way to handle a user clicking on the X on the caption bar
to close it ? This is how I'm handling it at the moment :-
' Display the mail dialog modeless to allow program execution to continue.
DIALOG SHOW MODELESS hDlg TO MainResult
' Code to get network information etc.
' Loop allowing dialog events until the MainResult is set or no dialogs !
DO
DIALOG DOEVENTS TO Count
LOOP WHILE MainResult = 0 AND Count > 0
EXIT FUNCTION 'Exit PBMAIN
This works - but the manual states that DOEVENT shouldn't be
called if there are no Dialogs and the user may have closed the
one and only Dialog !!
------------------
Colin Mair
Comment