?
Solved

Sendmessage() Winspector

Posted on 2008-10-16
2
Medium Priority
?
276 Views
Last Modified: 2012-06-27
I'm using Winspector to find the window structure to the window I want to send the message to.  However I have come across a problem in that there is sever Windows refered to as TPanel.  How would I reference each one?  I have attached the code that I'm using which returns the windows handle and prints it in notepad.  Any suggestions would be greatly appreciated.
Dim hwndslx As Integer = FindWindow("TmdiMain", vbNullString)
    Dim slxa As Integer = FindWindowEx(hwndslx, 0, "MDIClient", vbNullString)
    Dim slxb As Integer = FindWindowEx(slxa, 0, "TfrmNewMainView", vbNullString)
    Dim slxc As Integer = FindWindowEx(slxb, 0, "TPanel", vbNullString)

Open in new window

Winspector-T-Panels.bmp
0
Comment
Question by:meteorelec
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 22733456
Hi meteorelec,

Refer to the image below.  I have labeled the Panels "A" thru "F".

You should be able to do it like this:
(I'm assuming you correctly found the "TfrmNewMainView" window)

    Dim hwndslx As Integer = FindWindow("TmdiMain", vbNullString)
    Dim slxa As Integer = FindWindowEx(hwndslx, 0, "MDIClient", vbNullString)

    Dim TfrmNewMainView As Integer = FindWindowEx(slxa, 0, "TfrmNewMainView", vbNullString)
    Dim TPanelA As Integer = FindWindowEx(TfrmNewMainView, 0, "TPanel", vbNullString)
    Dim TPanelB As Integer = FindWindowEx(TfrmNewMainView, TPanelA, "TPanel", vbNullString)
    Dim TPanelC As Integer = FindWindowEx(TPanelB, 0, "TPanel", vbNullString)
    Dim TPanelD As Integer = FindWindowEx(TPanelB, TPanelC, "TPanel", vbNullString)
    Dim TPanelE As Integer = FindWindowEx(TPanelD, 0, "TPanel", vbNullString)
    Dim TPanelF As Integer = FindWindowEx(TPanelE, 0, "TPanel", vbNullString)
    ...
TPanelsLabeled.jpg
0
 
LVL 2

Author Comment

by:meteorelec
ID: 22733750
Thanks a million idle_mind it worked brilliantly.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

771 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