🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.nativeapi.win32
5 messages
5 total messages Started by Graham Powell Mon, 07 Jul 2008 16:25
Does my aplication have the focus?
#108
Author: Graham Powell
Date: Mon, 07 Jul 2008 16:25
6 lines
1071 bytes
My application consists of basically a MDIForm. While it is running, is 
there a way of knowing if the application has focus or whether it has been 
transferred to another application such as NotePad for example.

All help appreciated
  Graham 
Re: Does my aplication have the focus?
#111
Author: Peter Below (TeamB)
Date: Mon, 07 Jul 2008 17:13
15 lines
1321 bytes
Graham Powell wrote:

> My application consists of basically a MDIForm. While it is running,
> is there a way of knowing if the application has focus or whether it
> has been transferred to another application such as NotePad for
> example.

if Application.Active then
   
-- 
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
Re: Does my aplication have the focus?
#166
Author: Graham Powell
Date: Tue, 08 Jul 2008 08:24
24 lines
1832 bytes
Application.Active does indeed report the correct state, but is there an 
event generated to notify me if this state has changed?
The FormDeactivate event does not get called when the focus switches from my 
application to Notepad.

Graham

"Peter Below (TeamB)" <none@nomail.please> wrote in message 
news:xn0fsel051ta5l002@newsgroups.borland.com...
> Graham Powell wrote:
>
>> My application consists of basically a MDIForm. While it is running,
>> is there a way of knowing if the application has focus or whether it
>> has been transferred to another application such as NotePad for
>> example.
>
> if Application.Active then
>
> -- 
> 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 
Re: Does my aplication have the focus?
#167
Author: Marc Rohloff [TeamB]
Date: Tue, 08 Jul 2008 12:51
12 lines
1597 bytes
On Tue, 8 Jul 2008 09:24:24 +0100, Graham Powell wrote:

> Application.Active does indeed report the correct state, but is there an 
> event generated to notify me if this state has changed?
> The FormDeactivate event does not get called when the focus switches from my 
> application to Notepad.

Use a TApplicationEvents component.

-- 
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
Re: Does my aplication have the focus?
#169
Author: Graham Powell
Date: Tue, 08 Jul 2008 16:15
19 lines
1579 bytes
Thanks for that.

Graham

"Marc Rohloff [TeamB]" <marc@nospam.marcrohloff.com> wrote in message 
news:1lsrpk6b196cg$.dlg@dlg.marcrohloff.com...
> On Tue, 8 Jul 2008 09:24:24 +0100, Graham Powell wrote:
>
>> Application.Active does indeed report the correct state, but is there an
>> event generated to notify me if this state has changed?
>> The FormDeactivate event does not get called when the focus switches from 
>> my
>> application to Notepad.
>
> Use a TApplicationEvents component.
>
> -- 
> Marc Rohloff [TeamB]
> marc -at- marc rohloff -dot- com 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads