473,804 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bring another app window to Top

I am trying to find how to bring another applications window to the
top of the screen from a C# application.

I can get the process by using this code:
Process[] processes = Process.GetProc essesByName("To olParamEditor") ;
But I bring the window of the app to the top.
Thanks,
~Boyed
Nov 15 '05 #1
1 6917
I don't think Winforms wraps SetForegroundWi ndow, so I imagine you'll need to pinvoke SetForegroundWi ndow which will require the HWND for the window you want to make the foreground window. SetForegroundWi ndow can be a finicky beast (MSFT doesn't want other apps to be switching the foreground window since the user should really control this). If you have trouble with it, take a look at AllowSetForegro undWindow.

Hope that helps

Jackson Davis [MSFT]
--
This posting is provided "AS IS" with no warranties, and confers no rights
Samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 15 '05 #2

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

Similar topics

0
1055
by: timothy.williams | last post by:
Hello. I recently installed Python2.4 on both Linux (Redhat FC3) and Windows XP. The build and installed went fine as far as I could tell. I Windows, when I bring up IDLE, or pythonwin, I can't bring up a new Frame widget with Tk(). If I use idle from a DOS window, everything's fine. Python programs I have that use Tkinter also work from either IDLE.
0
2101
by: zren | last post by:
Hi, I wonder if anyone knows how to programmatically make a python window get focus and bring it to front. Here a python window means the Tkinter Toplevel widget. Thanks. Zhen
1
2496
by: Charles A. Lackman | last post by:
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
4
3913
by: Brian Kitt | last post by:
I don't know where to ask this question. If you know of a better place to ask it, please let me know. I have a main web page containing many links to detail pages. All detail links open with Target=xxx, so that I only have 1 detail page open at a time. In other words, if you click on detail line 1, it opens a new internet explorer window with detail page. You can then alt-tab back to the main window, click a detail line 2, and it...
4
2630
by: A.M | last post by:
Hi, How can I bring up a WinForms application window among several other windows? I have tried Show() method, but it doesn't always work. Thanks, Alan
1
4176
by: Christoph Engelhardt | last post by:
Hi newsgroup, What I intend to do: Write a small programm, that will add a new Button to every Window right beside the Buttons for minimizing, maximizing and closing the window in the window's titlebar. When this button is clicked the window itself should be minimized to the systray On my way there I found hardly any example via Google that suited my needs. All I know about already is how to get all windows in VB.Net ( which
2
4979
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. How do you do this? I've tried using the API functions BringWindowToTop, SetForegroundWindow, and SetWindowPos and can't get any of them to work reliably. BringWindowToTop and SetForegroundWindow don't do anything, and SetWindowPos only seems...
0
1620
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 client remoting app to tell the server remoting app to bring itself to the front of all windows and it just doesn't seem to be working. I've tried the following methods to make this happen. If the server app (it's an exe that accepts messages from...
2
4072
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 my application to front), my problem was that after i press the hotkey, the window stays in minimize state instead of being in the front. i fount an article in google explaining (i think) how to solve this problem, but i couldn't understand what...
0
9591
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10087
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9166
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.