Running .w from a dialog box

Shannon Adams

New Member
For an application main menu (w-main.w), I am using a dialog box with buttons. When the user clicks on a button, the following code fires:

current-window:sensitive = no.
run w-app1.w.
current-window:sensitive = yes

99% of the time, when the called application is exited, the main menu re-appears. However, sometimes the main menu remains in the task bar and the only way to get it to re-appear is to right-click and choose restore. This only happens when running Windows XP. I don't recall it every happening in Me/98/95. Any ideas? 9.1c character.

Thanks,
Shannon
 
Did you try WINDOW-STATE attribute and MOVE-TO-TOP method from window widget ? Works fine with GUI...
 
Hi,

I did it the following way and never had problems with it:

Code:
DEFINE VARIABLE yWINDOW   AS WIDGET-HANDLE NO-UNDO.
DEFINE VARIABLE lMyHidden AS LOGICAL       NO-UNDO.
 
yMyWindow = FRAME {&FRAME-NAME}:HANDLE.  /* Handle of dialog */
lMyHidden = FRAME {&FRAME-NAME}:hidden.  /* get hidden status  */

yMyWindow:hidden = yes.    /* Hide Dialog */            
yMyWindow:visible = no.    /* make dialog invisible*/
 
run <Programm with Smart-Window>.
 
yMyWindow:hidden = lMyHidden.       /* unhide dialog*/
yMyWindow:visible = yes.   /* make dialog visible again */

Maybe this helps :)

Greetings
Mav
 
Hi Maviee,

Setting the HIDDEN attribute hides the widget and conversely setting the VISIBLE attribute views the widget, it's not the same thing.

For example, if you set a button attribute to HIDDEN = NO if the containing frame is HIDDEN = YES it still won't show up. But if you set VISIBLE = YES you would force the button to showup which will also make the frame VISIBLE.

That's all you need

<snippet>

MyWindow:hidden = yes. /* Hide Dialog */

run <Programm with Smart-Window>.

MyWindow:visible = yes. /* make dialog visible again */

</snippet>

There's a thorough explanation in the on-line felp (F1) and the documentation.



Shannon cross posted on PEG and I believe he already got an answer, but he didn't bother to tell us, remember that the next time he's desparate for help.

http://mail.google.com/mail/h/1x5xlq9ygohyq/?s=s&th=106ec23304df5514&v=c
 
Back
Top