Bring my FORM to front??

G

Guest

Hi,

I have an application where I've implemented a global hotkey, so no matter
what other application is in front (have focus), my app will react when the
key combination is pressed. This works fine.

My problem is now that the form I want to show, does not come to the front.

I've tried to set Topmost to true, but then the form doesn't recieve focus.

How can I bring my form to front and give it focus eventhough another
applicetion (like Outlook) is in front (have focus)??

Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

:blush:)

M O J O
 
H

Herfried K. Wagner [MVP]

M O J O said:
I have an application where I've implemented a global hotkey, so no matter
what other application is in front (have focus), my app will react when
the
key combination is pressed. This works fine.

My problem is now that the form I want to show, does not come to the
front.

P/invoke 'AttachThreadInput' + 'SetForegroundWindow'.
 

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