troubleshooting Question

Retrieve data from a 3rd party window application ( VB6.0 500 POINTS )

Avatar of KingSencat
KingSencat asked on
Visual Basic Classic
22 Comments1 Solution478 ViewsLast Modified:
I have a code to retrieve a  text from a 3rd party application and then bring back to my vb project, i use winspector to find the handle to the window and to the text, however i need to get onother text too but i can't find the class name for this text.

This is an example i use to get the text1: ( IS 100% WORKING)

Dim nHwnd As Long
Dim nEditHwnd As Long, mainContainerHwnd As Long
Dim nText As String * 256
 nHwnd = FindWindow(vbNullString, inspector1windowname.Caption)
mainContainerHwnd = FindWindowEx(nHwnd, 0&, "#32770", vbNullString)
nEditHwnd = FindWindowEx(mainContainerHwnd, 0&, "Static", vbNullString)
SendMessageSTRING nEditHwnd, WM_GETTEXT, 256, nText
nextaction1.Caption = nText
end sub
'' end of code

the second text i need to get is the following

3rdparty window :

Players: 4          '<== this is the text i need to get back to my vb project

Now in winspector what i can see is this :

#32770: "Players"

.. for some reason its doesnt display the 4 so if i try to get the players i will just get the text players and not Players: 4

What i have to do to get the number of the players?

thanks to all!
Join our community to see this answer!
Unlock 1 Answer and 22 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 22 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros