determining current winform application is active, has focus or being used

  • Thread starter Thread starter c_shah
  • Start date Start date
C

c_shah

VB 2005 and windows form application

I am having difficulty putting my question into words but..

Is there a way to determine whether my win form application has focus
or it is active or being used?
 
I think I should have give some more information

I want to refresh my application's underlying datasources (DataSet and
Object Collection) periodically
to reflect underlying database changes.

I have put a timer on the form which will call a sub procedure to
update the application's underlying datasources. I just want to make
sure that if the current application is being used just skip the call
to subprocedrue to update datasources.
 
Try (VB 2005)
System.Windows.Forms.Application.OpenForms

c_shah 写é“:
 
It will give me whether the form is open or not?

I want to know whether you have focus on the form (by mouse or
keyboard).
 
Back
Top