Solved

Need to S/D another app - can't find handle

Posted on 1999-01-11
6
167 Views
Last Modified: 2010-05-03
My VB app needs to send a WM_Quit message to a remote application but cant find window using FindWindow API call. The app is a toolbar and has no caption, but SPY++ says it's caption is "Conference Panel". FindWindow doesn't see this name. If i manually give it the hwnd it works. ????
0
Comment
Question by:rblackwell
  • 3
  • 2
6 Comments
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1455385
You might have confuesed the window caption and the class name. The class name is the first param in FindWindow, the caption is the second. Anyway, every window has a class name, you can use FindWindow with that class name to look it up.

Tell me if it works
0
 
LVL 1

Accepted Solution

by:
Johnn earned 100 total points
ID: 1455386
MikeP is right.  Use the FindWindow API like this:

hWnd=FindWindow("Conference Panel",vbNullString)

The only problem you'll have with this is that if you have more than one instance of that class running the function will likely return the one most recently used or highest in the hirearchy.

John

0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1455387
John, that's called stealing answers
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Expert Comment

by:Johnn
ID: 1455388
Mike, sorry I guess your's wasn't detailed enough?  It's my first time here...

John
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1455389
Ok, I realize that.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1455390
Bought This Question.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to create a duplicate finder Application 9 115
Excel object stays open 19 71
message box in access 4 41
Spell Check in VB6 13 99
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now