Solved

Sendmessage() Winspector

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

757 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

19 Experts available now in Live!

Get 1:1 Help Now