Read Textbox content

orcus85

New member
Joined
Jun 15, 2007
Messages
4
Programming Experience
5-10
Hello!, I think this is an interesting challenge for many of you

Is there a way to get the content of a textbox or richtextbox in
another program, given the handle of the control?
I have seen other applications which can do this, so it is possible.

There are two interesting ways to do this:

1. Asynchronously:
A simple function like: getTextboxContent(handle) as String,
which gets all the content of the textbox

2. Synchronously:
A way to register your own callback function which
is called with the new content whenever the textbox is modified:
callBack(dump)

Does anyone have an idea as to how to specifically to either one of
these, preferably both.

NOTICE: The textbox or richtextbox is in another program which
has nothing to do with our program or VB.NET
 
I'd have said your intersting options were the other way round. A callback is used in async ;)

Look up SendMessage and WM_GETTEXT
 
Tried it, it worked, but kind of not

I tried what you suggested, thanks alot.

I was able to get the content from seemingly simple
textboxes, such as the textfield in notepad, but its
not working for alot of other applications that I
know its supposed to work for.

What other technique could be used?
why do you think its not working by just sending WM_GETTEXT
for all applications?
 
Back
Top