Bring To Front

G

Guest

Hi,

I've a windows application, with RegisterHotKey.
my problem is that when i press the HotKey, i want that a window form will
pop-up, and that's what happens but, the window is in a miniMize state
(incase my application is not focused). meaning, if i'm using Outlook and
pressing the HotKey, my new window will be in a minimize state instead of
being in the fornt of my screen.
I'm using the BringToFront() function but still i don't get the result i need.
maybe i'm using it not in the right place... ?

Thanks,
Gidi.
 
M

Marc Gravell

You could check the Form's WindowState; if it is Minimized, change it
to Normal (or what it was last)?

Marc
 
M

Michael Nemtsev, MVP

Hello Gidi,

This is standard behaviour, since win 98 and above.
Everything you can do, by standard is to use set the correct form state and
call Form.Activate. But it doesn't make your windows above your Outlook

another tricks, about making form "really active" involves registry editing

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


G> Hi,
G>
G> I've a windows application, with RegisterHotKey.
G> my problem is that when i press the HotKey, i want that a window form
G> will
G> pop-up, and that's what happens but, the window is in a miniMize
G> state
G> (incase my application is not focused). meaning, if i'm using Outlook
G> and
G> pressing the HotKey, my new window will be in a minimize state
G> instead of
G> being in the fornt of my screen.
G> I'm using the BringToFront() function but still i don't get the
G> result i need.
G> maybe i'm using it not in the right place... ?
G> Thanks,
G> Gidi.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top