473,405 Members | 2,272 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,405 software developers and data experts.

WPF active windows

Hi,

I would like to write aplication in WPF, and I would like to list all opened
windows in the system, get the headers of the windows and get the active
window. How to do it ?
Is any event, that I can handle, with tell me, that active window is changed
?

Thanks for help

Oct 16 '08 #1
3 3658
imbirek8 wrote:
I would like to write aplication in WPF, and I would like to list all
opened windows in the system, get the headers of the windows and get the
active window. How to do it ?
Is any event, that I can handle, with tell me, that active window is
changed ?
You can enumerate the windows of an application using the property named
Windows of an Application instance object:
http://msdn.microsoft.com/en-us/libr...n.windows.aspx
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Oct 16 '08 #2
"Martin Honnen" <ma*******@yahoo.dewrote in message
news:eQ**************@TK2MSFTNGP05.phx.gbl...
imbirek8 wrote:
>I would like to write aplication in WPF, and I would like to list all
opened windows in the system, get the headers of the windows and get the
active window. How to do it ?
Is any event, that I can handle, with tell me, that active window is
changed ?

You can enumerate the windows of an application using the property named
Windows of an Application instance object:
http://msdn.microsoft.com/en-us/libr...n.windows.aspx
But I would like to enumerate windows from the system, like firefox,
thinderbird, VisualStudio etc.

Oct 16 '08 #3
rOn Thu, 16 Oct 2008 07:44:47 -0700, imbirek8 <im******@op.plwrote:
But I would like to enumerate windows from the system, like firefox,
thinderbird, VisualStudio etc.
I don't think .NET includes that functionality. You'll have to use the
unmanaged Windows API via p/invoke.

See functions like EnumWindows(), GetWindow(), and FindWindow().

Pete
Oct 16 '08 #4

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

Similar topics

1
by: Paige W. | last post by:
I have added a mainmenu object to my windows form and would like to display an MRU list on it. Is there an easy way? or do I have to do it programatically? Can anyone point me to a good tutorial....
1
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...
3
by: memHog | last post by:
I am trying to no avail, to create a program that every once in a while checks to see if another program is active. When it finds it isn't, it will make it active using the Shell command. VB 6.0...
5
by: gregory_may | last post by:
I want to trap a key at the System wide level. Similar to Win-Amp ... you can press - Ctrl-Alt-Pg down from Any Program & switch songs. How can I do this in VB.Net?
0
by: Bill Nguyen | last post by:
We have the need to refresh all active windows on a desktop PC every 5 minutes or so. We have an application that displays some data in 4 windows (manually loaded 4 times and arranged to fit the...
2
by: Olie | last post by:
I need to create a application that acts as an Active Windows Desktop. I can currently get a form with controls to behave like the desktop and I use API functions (SetPosition()) to force it to...
68
bartonc
by: bartonc | last post by:
I've decide to compile a bunch of your favorite tips and tricks for the Articles section. I found a post yesterday by Chrisjc that is a perfect example. I copied his post over to create Dealing with...
4
by: nagar | last post by:
On certain occasions I get COM exceptions errors when enumerating the Windows Explorer active windows Some customers reported the error System.OutOfMemoryException: Retrieving the COM class...
1
parajaganesh
by: parajaganesh | last post by:
I am using Windows ClearCase Explorer. I do some scripting process to create a new view in ClearCase. But it cannot be displayed in the current screen. We need to press Alt + F5 after running my...
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
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
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
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.