Solved

Read a label caption in another application

Posted on 2006-10-19
5
453 Views
Last Modified: 2010-04-04
I need to read a caption of a label in another application.

How can I do this?

Thanks.

Felipe.
0
Comment
Question by:felipesch
5 Comments
 
LVL 28

Expert Comment

by:2266180
ID: 17765866
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
 
LVL 18

Expert Comment

by:Johnjces
ID: 17766199
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
 
LVL 26

Accepted Solution

by:
Russell Libby earned 500 total points
ID: 17766537
TLabel is a NON-WINDOWED control, ie no HWND. So what you guys are posting isn't going to fly.....

Regards,
Russell
0
 
LVL 28

Expert Comment

by:2266180
ID: 17768343
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
 
LVL 28

Expert Comment

by:TName
ID: 17770192
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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use Hashing sha1 in Delphi 2010 4 259
code issue 8 126
Controlled Assessment GCSE - desperate help needed 4 84
Firemonkey android show image from resource ? 1 41
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now