Posted By

georgecucoreanu on 07/21/11


Tagged

formopeneddetect


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Priestd09


C# detect if form is opened


 / Published in: C#
 

URL: http://hashfactor.wordpress.com/2009/01/28/c-check-if-a-form-is-already-opened/

  1. public static Form IsFormAlreadyOpen(Type FormType)
  2. {
  3. foreach (Form OpenForm in Application.OpenForms)
  4. {
  5. if (OpenForm.GetType() == FormType)
  6. return OpenForm;
  7. }
  8.  
  9. return null;
  10. }

Report this snippet  

You need to login to post a comment.