Visual C# | Capturing data from a window in a closed-source third-party Win32 application

Posted by Zach Albia on Stack Overflow See other posts from Stack Overflow or by Zach Albia
Published on 2010-03-31T09:21:11Z Indexed on 2010/03/31 9:23 UTC
Read the original article Hit count: 360

Filed under:
|
|
|
|

I'm planning on creating a C# Windows Forms app as an extension for a third-party Win32 application but I'm stumped as to how to do this right now. The farthest I've gotten is knowing it involves Win32 Hooking and that there's this open source project called EasyHook that's supposed to allow me to do this.

I'd like to know how I can get the text from a textbox or some other data from a control in a third-party Win32 application. The text/data in a control is to be captured from the external application's running window the moment the user presses a button.

I guess the question can be summed up as follows:

  1. How do you determine the event to hook to when the user clicks a certain button?
  2. How do you get the value displayed by a Win32 control at the time the button is clicked?

© Stack Overflow or respective owner

Related posts about c#

Related posts about win32