Determining an active application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

From an application form, how do I determine whether the application is
active, i.e. running as a foreground task insteads of a background task?
 
Hi,


In Access? Screen.ActiveForm returns the FORM (object) having the
Focus.



Hoping it may help,
Vanderghast, Access MVP
 
Thanks for your reply.
Yes, I would like the Access form to determine whether it is the active
window (i.e. it is running as a foreground task), and whether it is the
inactive window (i.e. it is running as a background task). Note that, the
application has only one form.
 
Hi,


GetForegroundWindow (Declare Function GetForegroundWindow Lib "user32" ()
As Long) returns the handle of the window with which interacts the user.



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top