Solved

Sendmessage() Winspector

Posted on 2008-10-16
2
261 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
2 Comments
 
LVL 85

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

867 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

22 Experts available now in Live!

Get 1:1 Help Now