From: Art H. <art...@ar...> - 2013-08-14 01:59:24
|
<html><head><meta name="Generator" content="PSI HTML/CSS Generator"/> <style type="text/css"><!-- body{font-family:'Tahoma';font-size:12pt;font-color:'#000000';} LI{display:list-item;margin:0.00in;} p{display:block;margin:0.00in;} --></style> </head><BODY ><div><SPAN style="font-size:12pt;color:navy;">> On Tue, Aug 13, 2013 at 2:08 PM, Art Heimsoth</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> <art...@ar...> wrote:</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">></SPAN></div> <div><SPAN style="font-size:12pt;color:purple;">>>> For your specific problem here, I would write my own timed</SPAN></div> <div><SPAN style="font-size:12pt;color:purple;">>>> message</SPAN></div> <div><SPAN style="font-size:12pt;color:purple;">>>></SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>> dialog.  When using it, send a reference to the executing dialog</SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>> to your timed message dialog.  In your timed message,</SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>> periodically check back to see if the other dialog is still</SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>> alive.  Quit the</SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>></SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">></SPAN></div> <div><SPAN style="font-size:12pt;color:purple;">>>> timed message if you discover the other dialog is ended.</SPAN></div> <div><SPAN style="font-size:12pt;color:purple;">>>></SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>></SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>> I tried to start a second dialog and then use WinTimer in that</SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>> dialog, with</SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>></SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>> the intention of setting a shared variable from the main dialog</SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>> when I wanted</SPAN></div> <div><SPAN style="font-size:12pt;color:maroon;">>></SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> the second dialog to end.  The second dialog would put up a panel</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> that includes a "Cancel" button to allow manual cancellation if</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> necessary.  </SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> The problem I am running into is I have not found a way to allow</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> the main dialog to regain control and continue to do work while the</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> timer is running. I can cancel the second dialog with the "Cancel"</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> and that is when the first dialog resumes operation.  What am I</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> missing?  I have the second dialog defined with the STYLE</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> DS_MODALFRAME - should it be something else?</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">></SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">></SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> Well I don't think I'd use DS_MODALFRAME, but that has nothing to</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> do with your problem.</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">></SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">></SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> It is most likely the way you are starting the second dialog.  If</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> you use execute(), the method will not return until the second</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> dialog ends, and your first dialog can not continue until execute()</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> returns.</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">></SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">></SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> You need to use popup() to start the second dialog.  The popup()</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> method returns immediately and your first dialog can continue</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">> working.</SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">></SPAN></div> <div><SPAN style="font-size:12pt;color:navy;">That was the problem.. thanks again for your help.</SPAN></div> <div><SPAN style="font-size:12pt;"><br /><br />--<br />  Art Heimsoth - art...@ar...</SPAN></div> </body></html> |