Read/Write values in textbox of Java Application from WinForm(c#) Application RRS feed

  • Question

  • I am developing an application which will Read/Write values in textbox of JAVA Application(3rd party).

    for writing textboxes of java app i am using SendKeys(); for example :-


    this is perfectly working fine

    now i want to read values from textbox of java app(3rd party) please help me how to read data from it. i tried with "User32.dll" but its only giving me result for Parent window.



    Tuesday, March 26, 2019 10:47 AM

All replies

  • Hello,

    Although not an exact solution the following will point you in the right direction. 

    What the post shows is using API methods to get at text in another external app.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    profile for Karen Payne on Stack Exchange

    Tuesday, March 26, 2019 1:23 PM
  • The older versions of Visual Studio included the "spyxx" application that let you poke into the window attributes of all windows in the system.  From that, you can learn how the windows are nested, and perhaps even which ID values you should use to get the data you need.

    HOWEVER, some modern application libraries implement their own data controls from scratch without using the user32.dll templates.  In that case, the parent might just appear as one big, empty window.  If that's what you find, then you cannot fetch the data at all unless the app makes an interface available.

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Tuesday, March 26, 2019 9:52 PM
  • Try this too:

       SendKeys.Send( "^A^C" );


       string text = Clipboard.GetText();

    Wednesday, March 27, 2019 3:36 AM