Oliver
Wed Aug 17 07:22:25 CDT 2005
Niggy wrote:
> Is it possible to check if an instance of a form exists? TIA.
Do you mean a specific instance or just any instance at all? If you have
a variable of the type of your form and you don't know if you have
instantiated it yet, you can check for null:
MyForm myForm;
...
if (myForm == null)
// do something
Be aware that myForm will only be automatically initialized to null if
it's a class member (field), not if it's a variable in a method.
If you mean you want to find out whether just any instance of a form
exists, I don't think that's possible. You should store away the
references to forms you create, so you can later find out what you
created or not.
Oliver Sturm
--
omnibus ex nihilo ducendis sufficit unum
Spaces inserted to prevent google email destruction:
MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
ICQ 27142619
http://www.sturmnet.org/blog