473,386 Members | 1,883 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,386 software developers and data experts.

FindWindow

Jon
Hello I am trying to use findwindow to list all the instances of an
application given a specific class name i.e multiple instances of notepad.
however findwindow will only find 1 instance of notepad and not anyothers if
more than one notepad is running. How do I detect all the instances of
notepad that are running?
Nov 17 '05 #1
2 1903
Jon wrote:
Hello I am trying to use findwindow to list all the instances of an
application given a specific class name i.e multiple instances of notepad.
however findwindow will only find 1 instance of notepad and not anyothers if
more than one notepad is running. How do I detect all the instances of
notepad that are running?

have a look at FindWindowEx
hth

--
Ben
http://bschwehn.de
Nov 17 '05 #2
"Jon" <no*@me.com> wrote in message
news:et**************@TK2MSFTNGP09.phx.gbl...
Hello I am trying to use findwindow to list all the instances of an
application given a specific class name i.e multiple instances of notepad.
however findwindow will only find 1 instance of notepad and not anyothers
if
more than one notepad is running. How do I detect all the instances of
notepad that are running?


The canonical method is to call EnumWindows(). A callback is dispatched to
you for every top-level window in the system. Inspect the window's class
there and add it to a list or ignore it as appropriate.

Regards,
Will
Nov 17 '05 #3

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

Similar topics

17
by: lauren quantrell | last post by:
I have an Access application with the name: MyAppName® It has the "®" symbol (ChrW$(&H00AE)) at the end of it. If I remane the application without the "®" symbol, I can use FindWindow to close the...
5
by: Tony | last post by:
I need to send a message to a window in another application. The name of the window is known at design time and set in the constant App2_MONITOR_CAPTION. The message is defined as X_GenerateEvent....
5
by: victor | last post by:
Help .... This is my situation: I've made two apps, a Managed C# and an Unmanaged MFC. The C# app communicates with the MFC-app via (Win32-API) PostMessage, done with the P/Invoke method. One...
3
by: kd | last post by:
Hi All, I need to check whether an application is executing. I do not know the class name of the application; however, I know the window caption of the application. What would be the first...
3
by: Bob | last post by:
Hi, Trying to determine if a program is running or not. I implemented the example code below but I am getting handles returned regardless of whether a program exists or not. i.e. You can feed in a...
0
by: ntm | last post by:
Hi all you good m8 I try to make my first small program in vb, but im not very succesfull :D (Im using Visual Studio 2005) Form my own program i will like to set focus on an other running...
0
by: Jim S | last post by:
Is looping FindWindow() ok? We have a simple little c# 2.0 app that’s sole purpose is to look for a dialog box from another app to pop up and then click it’s OK button. To do this we use a...
2
by: Alex | last post by:
Dear coleagues, I am trying to call FindWindow function but it seems not to be working. It returns a loooooong value even if the Window "SoftMaxPro GxP" is not started. I can't even find a...
1
by: musai | last post by:
Hi Members how to use findwindow API for outlook application let us example For excel we use to find excel FindWindow("XLMAIN", vbNullString)
2
by: MegaOctet | last post by:
Hello, Here is my script import win32gui as w HWND= w.FindWindow("Document - WordPad",None) and here is the traceback: Traceback (most recent call last): File "C:\Python26\essai1.py",...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.