How to find if Application has Focus



In my Application, I need to make a certain graphical refresh, interrogating SqlServer, only if Application has focus (i.e. the title bar is blue).

Interrogating .Focused property of various forms of the project is not the way (maybe, enumerting forms and checking if at least one of them has focus may work, but I don't think this to be the most beautiful solution).

Any idea?

Thanks in advance

Alberto

--
Georges Pompidou: Un uomo di stato è un politico che dona se stesso al servizio della nazione. Un politico è un uomo di stato che pone la nazione al suo servizio.


.



Relevant Pages

  • RE: How to find if Application has Focus
    ... interrogating SqlServer, only if Application has focus (i.e. the title ... Un uomo di stato è un politico che dona se stesso al ... servizio della nazione. ...
    (microsoft.public.dotnet.languages.csharp)
  • Tap contacts and start MY APP
    ... I'd like to configure my WM5 pockect pc, in order to open my preferred contact management application, instead of MSPOutlook conctacts. ... Un uomo di stato è un politico che dona se stesso al servizio della nazione. ...
    (microsoft.public.pocketpc)