Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sendmessage() Winspector

Posted on 2008-10-16
2
Medium Priority
?
283 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

604 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