473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Bring my FORM to front??

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
3 4756
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tyson | last post by:
I have got this little piece of code that fires on exit of a text box. It run's my query perfectly based of my form input. But I don't know how to bring result in my query back to a text box on my...
7
by: tom | last post by:
Hi, I want a listbox below a hidden calendar control. The problem is that the listbox will shadow the calendar when the calendar is visible. How can I bring the calendar from back to front? ...
2
by: Don | last post by:
I have two programs. One is supposed to bring the other (which is already running either minimized or at the bottom of the window z-order) to the front so that it becomes the foremost application....
2
by: JohnR | last post by:
Let's say I have an MDI parent form with a textbox. If I create an MDI child form and, at runtime, move the MDI child window over the textbox on the MDI parent, the textbox appears in front of the...
2
by: James | last post by:
Hi all, I am new to VB.NET. My program has two forms, if user clicks an "OK" button in Form1, the From2 will be brought to front. I found there are three methods of the Form class related to...
5
by: Iain Bishop | last post by:
I have a simple form with 4 command buttons and 1 label. The label is sometimes visible and sometimes not. When it is visible I want it to be in front of the buttons. I've tried bringing the label...
1
by: Marcel Brekelmans | last post by:
Hello, I have an application with a notifyIcon. When my application's main form is hidden by some other window I would like to bring it in front by single-clicking the NotifyIcon. However, I...
0
by: SAL | last post by:
Hello, I'm having trouble bringing a window to the front of all windows in an application I'm building. Actually, it's two applications that communicate via .NET Remoting. I'm trying to get the...
2
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I asked here yesterday about bringing a form to front with hotkey while using different application then mine (meaning, when i'm using outlook, and pressing ALT+T it will bring a form from...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.