how to check if a form is already open

  • Thread starter Thread starter Rainer Halanek
  • Start date Start date
R

Rainer Halanek

Hi,

How do I check that a form is already open? I think I have
to check how many instances of that form class are
initiated, but how do I do that?

Thanks, Rainer.
 
Rainer,
How do I check that a form is already open? I think I have
to check how many instances of that form class are
initiated, but how do I do that?

Do you want to check if the form is already open so you only have a single
instance of the form open at a time? If so, you can accomplish this by
implementing the Singleton pattern. This technique is discussed in the
following on-line articles:

C#: http://www.c-sharpcorner.com/Code/2003/Jan/SingletonPattern.asp
VB.NET: http://www.ondotnet.com/pub/a/dotnet/2002/11/11/singleton.html

Kevin McNeish
C# MVP
www.oakleafsd.com
 
Back
Top