By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,491 Members | 1,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,491 IT Pros & Developers. It's quick & easy.

Bring my FORM to front??

P: n/a
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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

:o)

M O J O
Oct 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Won't BringToFront or Focus do this?

Thanks,

Seth Rowe

M O J O wrote:
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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

:o)

M O J O
Oct 6 '06 #2

P: n/a
"M O J O" <MO**@discussions.microsoft.comschrieb:
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'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Oct 6 '06 #3

P: n/a
Hi Herfried,

Thanks for once again helping me out here!

:o)

M O J O

"Herfried K. Wagner [MVP]" wrote:
"M O J O" <MO**@discussions.microsoft.comschrieb:
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'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Oct 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.