Solved

Read a label caption in another application

Posted on 2006-10-19
5
446 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:ciuly
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:ciuly
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

10 Experts available now in Live!

Get 1:1 Help Now