Jump to content
  • Advertisement
Sign in to follow this  
Z3R0Bit

C# Problem

This topic is 3886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can I read text from a textbox or smth like that from another application. Tell me if u didn't get the idea.

Share this post


Link to post
Share on other sites
Advertisement
You will need to find the Window Handle of the other application's window and then the control in order to read from it.

You probably would have to enumerate all Windows on the screen, check the name of it and then find the required control on it. It is possible, since you can just send messages to a Window Control, but it requires quite some work.

Toolmaker

Share this post


Link to post
Share on other sites
Toolmaker is correct. You essentially need to enumerate top level windows (stuff that is open and visible) and get a handle to be able to do any kind of manipulation. That said, I'm not sure whether it is possible for you to access the child controls on a random application the way you are suggesting.

Well, perhaps not through .NET normally; with some jiggery pokery and DLLImports you might manage it -- but doesn't sound like a very good idea anyway...is there a good reason for doing this??

Take a look at this for ideas, perhaps.

~Shiny

Share this post


Link to post
Share on other sites
Also be careful when accesing different gui elements through other programs.GUI elements are not thread-safe meaning if two or more threads try to access a GUI element funky things will happen.You would need someking of synchronization(monitors,lock,mutex,semaphore O_O)

Share this post


Link to post
Share on other sites
thanks

I posted the exact same thing in "For Beginners". Just wanted to get more info on the topic from different parts
I think I got the basic idea on how to do what I wanted

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!