Read a label caption in another application

I need to read a caption of a label in another application.

How can I do this?

Thanks.

Felipe.
felipeschAsked:
Who is Participating?
 
Russell LibbyConnect With a Mentor Software Engineer, Advisory Commented:
TLabel is a NON-WINDOWED control, ie no HWND. So what you guys are posting isn't going to fly.....

Regards,
Russell
0
 
2266180Commented:
you should be able to adapt the following code to work for tlabel without much hassle: http://www.delphi3000.com/articles/article_3067.asp (free registration recuired)
you should also follow the recommendations from the comments and use ChildWindowFromPoint if teh label is inside another control.
0
 
JohnjcesCommented:
If you  download WinHandles.zip you will have a sample application with all source code that allows you to get all text from most any component, button, edit or whatever in another application whether written in Delphi or not. Check out the code, run the sample and you can see how this is done!

Here is the location:

ftp://jcitssystems.com/pub/DelphiExamples/WinHandles.zip

A bit advanced.

JJ
0
 
2266180Commented:
you know russel, now that you posted that it hit me and really hard. because tell you the truth, the first thing I wanted to write is that TLabel is a windowed control and so you can use blabla functions and then I thought I'd better just google something up.
what was is my mind at that time is beyond me...
0
 
TNameCommented:
Felipe, did you write the other application yourself or can you make changes to it?
If yes, you could replace the label (e.g. with a TStaticText control which is a windowed control) , and then the mentioned methods would apply.
0
All Courses

From novice to tech pro — start learning today.