Can you get the window handles/contents of controls with VB.net?

  • Thread starter Thread starter rob
  • Start date Start date
R

rob

Hello,
I would like to create a VB.net program that can grab the
text/contents inside a control (like a label control) in an external
program (one I didnt make).

The scenario is this:
The program I want this data from is one that we use daily. One of
it's controls shows the customer's ID (which is the primary key on the
database) I would like to be able to

1) mouseover/click on that control and get the window handle and text
in that control which my app can then use to retrieve the files
associated with the contents of that control.

OR

2) have my app sense when that control's contents change and do the
same thing as above.

I know how to get the main window handle of this application, and I
have seen many refrerences to a API function called
EnumChildWindows().

I have looked up this function on MSDN, but I cant determine how to
get values returned from it.

I know I am missing something, clearly- but I cant find the
documentation I need.

Is this possible with VB.net? I have seen a few references to a
product called Spyworks, but I would like to learn how to do this on
my own.

I dont really need to control this other program-- just be able to get
text from a specific area of the main window.

I know there are some posts here that indicate others are looking for
similar info- but I really just need to get that EnumChildWindows
function to return some info...

Any info is appreciated.

Rob
 
You still out there? I could try and put something together for you.
I have VB 6.0 code that would accomplish that, but have not tried from C#.

-Eric
 
Back
Top