From: Amit on
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);

Thanks in advance.

Regards
- Amit Gupta

From: Gernot Frisch on

> 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.


From: Larry Lindstrom on
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
From: mike on

"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


From: Amit on

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.

Any other suggestions ?

Thanks for your response

Regards
- Amit Gupta