Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 1999-01-11
6
Medium Priority
?
176 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 400 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

876 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