Solved

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

Posted on 1999-01-11
6
166 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
Comment Utility
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
Comment Utility
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
Comment Utility
John, that's called stealing answers
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Expert Comment

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

John
0
 
LVL 8

Expert Comment

by:MikeP090797
Comment Utility
Ok, I realize that.
0
 
LVL 13

Expert Comment

by:Mirkwood
Comment Utility
Bought This Question.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 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

11 Experts available now in Live!

Get 1:1 Help Now