C# detect if form is opened


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.