Mega Search
23.2 Million


Sign Up

Make a donation  
Getting caption or text of a button in another application.  
News Group: borland.public.delphi.nativeapi.win32

<<< I think I posted this, but did not see it in the forum 
I appologize if this is posted twice >>> 

I need to create a console application that would get the title,
of another Window (Form) application. Then, I would like to 
get the caption of a component (buttion) on that application, so
that I can take any action.... 

I was able to do this in C# with the exception of getting the
caption of a button on that application. Most answers that 
I got on C# was that I would need to call some C++ library, etc.
Otherwise, I would need a ManagedSpy (or SPy++) to read the
properties of a running process (or application). I would want
to do this programmatically. And since I was told that this 
is possible with only C++, I assume that, it would be possible
in Delphi. 

Can you point me to a sample code or the link where I can 
find a solution for this kind of application, using Delphi?
I'm currently using Delphi 7.0

Your immediate response to this request would be greatly 
appreciated.

Sincerely:

Gbenga


Vote for best question.
Score: 0  # Vote:  0
Date Posted: 7-Jan-2008, at 9:17 AM EST
From: Gbenga
 
Re: Getting caption or text of a button in another applicati  
News Group: borland.public.delphi.nativeapi.win32
Thank you very much. I'll let you know the result.

"Peter Below (TeamB)"  wrote:
>gbenga wrote:
>
>> 
>> <<< I think I posted this, but did not see it in the forum 
>> I appologize if this is posted twice >>> 
>> 
>> I need to create a console application that would get the title,
>> of another Window (Form) application. Then, I would like to 
>> get the caption of a component (buttion) on that application, so
>> that I can take any action.... 
>> 
>> I was able to do this in C# with the exception of getting the
>> caption of a button on that application. Most answers that 
>> I got on C# was that I would need to call some C++ library, etc.
>> Otherwise, I would need a ManagedSpy (or SPy++) to read the
>> properties of a running process (or application). I would want
>> to do this programmatically. And since I was told that this 
>> is possible with only C++, I assume that, it would be possible
>> in Delphi. 
>> 
>> Can you point me to a sample code or the link where I can 
>> find a solution for this kind of application, using Delphi?
>> I'm currently using Delphi 7.0
>> 
>> Your immediate response to this request would be greatly 
>> appreciated.
>
>Take a look at this sample app: 23987: Winalyzer: sample to enumerate
>window hierarchy of an app
>  http://cc.codegear.com/item/23987
>
>-- 
>Peter Below (TeamB)  
>Don't be a vampire (http://slash7.com/pages/vampires), 
>use the newsgroup archives :
>http://www.tamaracka.com/search.htm
>http://groups.google.com


Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 8-Jan-2008, at 12:40 AM EST
From: Gbenga
 
Re: Getting caption or text of a button in another applicati  
News Group: borland.public.delphi.nativeapi.win32
gbenga wrote:

> 
> <<< I think I posted this, but did not see it in the forum 
> I appologize if this is posted twice >>> 
> 
> I need to create a console application that would get the title,
> of another Window (Form) application. Then, I would like to 
> get the caption of a component (buttion) on that application, so
> that I can take any action.... 
> 
> I was able to do this in C# with the exception of getting the
> caption of a button on that application. Most answers that 
> I got on C# was that I would need to call some C++ library, etc.
> Otherwise, I would need a ManagedSpy (or SPy++) to read the
> properties of a running process (or application). I would want
> to do this programmatically. And since I was told that this 
> is possible with only C++, I assume that, it would be possible
> in Delphi. 
> 
> Can you point me to a sample code or the link where I can 
> find a solution for this kind of application, using Delphi?
> I'm currently using Delphi 7.0
> 
> Your immediate response to this request would be greatly 
> appreciated.

Take a look at this sample app: 23987: Winalyzer: sample to enumerate
window hierarchy of an app
  http://cc.codegear.com/item/23987

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 7-Jan-2008, at 12:26 PM EST
From: Peter Below (TeamB)