I have a formset within whcih I launch multiple forms.
I can also launch the same form multiple times.

I have another form that has a timer that does a few things and needs to set
the focus to itself. I want to then reactivate the form that was on top at
the time.

I am currently storing WONTOP() to mWontop at the beginning of the timer
event and then calling ACTIVATE WINDOW (mWontop) at the end of the timer
event.

This seems to work fine except when there are multiple copies of the active
window open. In this case, only the one first opened comes to the top.

I also tried the following but it did nothing:
mWontop = _Screen.ActiveForm
DO Stuff.......
mWontop.Activate

How can I reselect the specific window that was on top at the time?

Cheers
David

Re: How to redisplay the active form when another form gets the focus? by Stefan

Stefan
Mon May 05 01:16:10 CDT 2008

> mWontop = _Screen.ActiveForm
> DO Stuff.......
> mWontop.Activate

Activate() is "only" an event, try:

If VarType(m.mWontop) = 'O'
mWontop.Show()
Endif



hth
-Stefan


"David Younger" <david@theservicemanager.com> schrieb im Newsbeitrag
news:%23O$4OUaqIHA.3508@TK2MSFTNGP03.phx.gbl...
>I have a formset within whcih I launch multiple forms.
> I can also launch the same form multiple times.
>
> I have another form that has a timer that does a few things and needs to set
> the focus to itself. I want to then reactivate the form that was on top at
> the time.
>
> I am currently storing WONTOP() to mWontop at the beginning of the timer
> event and then calling ACTIVATE WINDOW (mWontop) at the end of the timer
> event.
>
> This seems to work fine except when there are multiple copies of the active
> window open. In this case, only the one first opened comes to the top.
>
> I also tried the following but it did nothing:
> mWontop = _Screen.ActiveForm
> DO Stuff.......
> mWontop.Activate
>
> How can I reselect the specific window that was on top at the time?
>
> Cheers
> David
>



--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------



Re: How to redisplay the active form when another form gets the focus? by David

David
Mon May 05 23:02:56 CDT 2008

Thanx Stefan,

That worked beautifully!

Cheers
David

"Stefan Wuebbe" <stefan.wuebbe@gmx.de> wrote in message
news:%237o5GenrIHA.4952@TK2MSFTNGP05.phx.gbl...
>> mWontop = _Screen.ActiveForm
>> DO Stuff.......
>> mWontop.Activate
>
> Activate() is "only" an event, try:
>
> If VarType(m.mWontop) = 'O'
> mWontop.Show()
> Endif
>
>
>
> hth
> -Stefan
>
>
> "David Younger" <david@theservicemanager.com> schrieb im Newsbeitrag
> news:%23O$4OUaqIHA.3508@TK2MSFTNGP03.phx.gbl...
>>I have a formset within whcih I launch multiple forms.
>> I can also launch the same form multiple times.
>>
>> I have another form that has a timer that does a few things and needs to
>> set
>> the focus to itself. I want to then reactivate the form that was on top
>> at
>> the time.
>>
>> I am currently storing WONTOP() to mWontop at the beginning of the timer
>> event and then calling ACTIVATE WINDOW (mWontop) at the end of the timer
>> event.
>>
>> This seems to work fine except when there are multiple copies of the
>> active
>> window open. In this case, only the one first opened comes to the top.
>>
>> I also tried the following but it did nothing:
>> mWontop = _Screen.ActiveForm
>> DO Stuff.......
>> mWontop.Activate
>>
>> How can I reselect the specific window that was on top at the time?
>>
>> Cheers
>> David
>>
>
>
>
> --
> |\_/| ------ ProLib - programmers liberty -----------------
> (.. ) Our MVPs and MCPs make the Fox run....
> - / See us at www.prolib.de or www.AFPages.de
> -----------------------------------------------------------
>