473,396 Members | 1,734 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 to Front

Hello,

I have created an application that searches to see if a process is running
and if it is it maximizes it's window.

i.e.

For Each AProcess In AProcesses
If AProcess.StartInfo.WindowStyle <> ProcessWindowStyle.Maximized Then
AProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
ShowWindow(AProcess.MainWindowHandle, 3)
End If
Next

Is there also a way to make the window "BRING TO FRONT" also?

Thanks,

Chuck
Nov 21 '05 #1
2 1590
"Charles A. Lackman" <Ch*****@CreateItSoftware.net> schrieb:
For Each AProcess In AProcesses
If AProcess.StartInfo.WindowStyle <> ProcessWindowStyle.Maximized Then
AProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
ShowWindow(AProcess.MainWindowHandle, 3)
End If
Next

Is there also a way to make the window "BRING TO FRONT" also?


You can use the 'SetForegroundWindow' function (+ 'MainWindowHandle' as
handle) to do that (for more info, see MSDN and
<URL:http://www.pinvoke.net/>).

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

Nov 21 '05 #2
"Charles A. Lackman" <Ch*****@CreateItSoftware.net> schrieb:
For Each AProcess In AProcesses
If AProcess.StartInfo.WindowStyle <> ProcessWindowStyle.Maximized Then
AProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
ShowWindow(AProcess.MainWindowHandle, 3)
End If
Next

Is there also a way to make the window "BRING TO FRONT" also?


You can use the 'SetForegroundWindow' function (+ 'MainWindowHandle' as
handle) to do that (for more info, see MSDN and
<URL:http://www.pinvoke.net/>).

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

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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? ...
0
by: ACaunter | last post by:
HI there.. I have a dropdown menu for my asp.net website (not a combo box with the down arrow).. its for Home, Compant, ... , Contact Us... and then when the mouse goes over it, the sub menus are...
9
by: DraguVaso | last post by:
Hi, I want my application to bring another application to the Front. I thought best way to do this was by the Process-model: Dim c As Process = Process.GetCurrentProcess() Dim p As Process...
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....
3
by: M O J O | last post by:
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...
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...
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...
1
by: Curious | last post by:
I have a dialog that should be in front of other dialogs. Now it was in front of others only for a little while, before it "disappeared". I've found out that it doesn't disapper. Instead, it is...
1
by: swethak | last post by:
Hi, How to do the bring front and bring back an images using javascript.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.