Solved

Sendmessage() Winspector

Posted on 2008-10-16
2
272 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 500 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 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