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

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. ????
rblackwellAsked:
Who is Participating?
 
JohnnConnect With a Mentor Commented:
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
 
MikeP090797Commented:
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
 
MikeP090797Commented:
John, that's called stealing answers
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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

John
0
 
MikeP090797Commented:
Ok, I realize that.
0
 
MirkwoodCommented:
Bought This Question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.