From: Amit on

mike wrote:
> "Amit" <amitgupta.it(a)gmail.com> wrote in message
> news:1164265849.959659.8570(a)e3g2000cwe.googlegroups.com...
> > Hi,
> >
> > I need to bring my application running (minimized initially) to front
> > of all running application, Similar to what happens when we press
> > alt-tab key combination.
> >
> > OS: win XP
> >
> > I have already tried the following API's
> >
> > SetFocus(hMainWindow);
> > SetForegroundWindow(hMainWindow);
> > ShowWindow(hMainWindow, SW_SHOW) ;
> > SetActiveWindow(hMainWindow);
>
> http://groups.google.com/groups?lnk=hpsg&q=switchtothiswindow+loadlibrary

Thanks Mike,

It works now....

Regards
- Amit Gupta

From: Grzegorz Wróbel on
Amit wrote:
> Larry Lindstrom wrote:
>> Gernot Frisch wrote:
>>>> I need to bring my application running (minimized initially) to
>>>> front
>>>> of all running application, Similar to what happens when we press
>>>> alt-tab key combination.
>>>>
>>>> OS: win XP
>>>>
>>>> I have already tried the following API's
>>>>
>>>> SetFocus(hMainWindow);
>>>> SetForegroundWindow(hMainWindow);
>>>> ShowWindow(hMainWindow, SW_SHOW) ;
>>>> SetActiveWindow(hMainWindow);
>>> GetWindowPlacement
>>> SetWindowPlacement or MoveWindow, I can't remember anymore.
>> SetWindowPos() can position a window on the screen and in the
>> Z order. I've never tried to pull a window from a minimized
>> state, so I'm not sure this will meet your needs. But this
>> is one more function you can try.
>>
>> Larry
>
> Hi Guys,
>
> The Api's u suggested did half the Magic.
> The application window comes to front if it is minimized but not when
> it is hidden by some other application.

The only trick that I know which always works is to minimize and
maximize the window. However you need to do it smart way if you don't
want to see the minimizing and maximizing animations (ie hide the
windows first).

--
Grzegorz Wr�bel
http://www.4neurons.com/
677265676F727940346E6575726F6E732E636F6D
From: Grzegorz Wróbel on
Grzegorz Wr�bel wrote:
> Amit wrote:
>> Larry Lindstrom wrote:
>>> Gernot Frisch wrote:
>>>>> I need to bring my application running (minimized initially) to
>>>>> front
>>>>> of all running application, Similar to what happens when we press
>>>>> alt-tab key combination.
>>>>>
>>>>> OS: win XP
>>>>>
>>>>> I have already tried the following API's
>>>>>
>>>>> SetFocus(hMainWindow);
>>>>> SetForegroundWindow(hMainWindow);
>>>>> ShowWindow(hMainWindow, SW_SHOW) ;
>>>>> SetActiveWindow(hMainWindow);
>>>> GetWindowPlacement
>>>> SetWindowPlacement or MoveWindow, I can't remember anymore.
>>> SetWindowPos() can position a window on the screen and in the
>>> Z order. I've never tried to pull a window from a minimized
>>> state, so I'm not sure this will meet your needs. But this
>>> is one more function you can try.
>>>
>>> Larry
>>
>> Hi Guys,
>>
>> The Api's u suggested did half the Magic.
>> The application window comes to front if it is minimized but not when
>> it is hidden by some other application.
you may add yet BringWindowToTop() to that list of APIs ;).

>
> The only trick that I know which always works is to minimize and
> maximize the window. However you need to do it smart way if you don't
> want to see the minimizing and maximizing animations (ie hide the
> windows first).
>


--
Grzegorz Wr�bel
http://www.4neurons.com/
677265676F727940346E6575726F6E732E636F6D