Determining if a form is active window (C#)

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

Guest

Hi! I have several mdi and non mdi forms opened that are of the same or different type.
I need to know how I can check if the form whose code is being executed is active at that time.
I can not use ActiveMDIChild since some of my forms are not MDI forms.

Is there a propertry or API > I prefer managed code.

Many Thanks for your help in advance,

D.
 
check for

this.MdiParent.ActiveMdiChild == this

condition in your code...



Regards,

Sanjeeva
 
Back
Top