John,
I once wrote a wee program much as you describe.
It simply looked every minute, and logged the window title.
So I can answer your first question anyway:
var s:String;
P:array[0..256] of Char;
h:THandle;
i:Integer;
begin
GetWindowText(GetForeGroundWindow,p,256);
s := p;
Regards,
Paul.
-----Original Message-----
From: John Bird [mailto:[EMAIL PROTECTED]
Sent: Friday,March,28,2003 2:00 p.m.
To: Multiple recipients of list delphi
Subject: RE: RE: [DUG]: More problems with onIdle
At 01:12 p.m. 28/03/2003 +1200, you wrote:
>I have yet another problem with my idle implementation. Our app
>displays a clock and the update of the clock un idles the application.
>Any suggestions how to avoid this?
>
I have a sort of similar question - I am interested to write a
background
program that every so often wakes and finds what Window has got focus,
and
Ideally its title-bar. This would enable me to record a little log as
an
aid for time-recording.
How easy is it in Delphi to:
1 - Find the details of the Window that has focus and the title bar or
any
distinguishing features.
2 - to check how long since any keyboard input or Window focus change?
(i.e. how long since the user has done anything)
(less important).
John Bird
Beyond Data Systems
[EMAIL PROTECTED]
Ph 64-3-3654656 or 027 436-7702
Fax 03-3793340
------------------------------------------------------------------------
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/