Hi Carlos,
this was also my first idea, but it does not work. let me describe what i
want to do:
I have a class called "ConfigurationForm" and i have a class (beside a lot
of other classes ;-) ) called
MainForm. Inside the MainForm's class there is a dynamic (private)
ConfigurationForm Object. This
Object will be initialized inside the MainForms Constructor, but the form is
still invisible until it
will be raised visible with "cf.Show();". This is done by Menu from the
MainForm or from a TrayIcons
Menu in the TaskBar. Both share the same code routine. When i open the the
CF(ConfigurationForm)
with cf.Show() and close it later with cf.Close(), the pointer or in our
case the reference will be no more
valid to the cf Object. So far so good! It would be easy always to open a
new instance of the CF and
make it visible with cf.Show(). I cant use cf.Visible because of some
special needs of the application.
Its somethink like this i want to do, but how, because the "null"-Thing does
not work, i always get a false
as return value:
if(cf == null){
cf = new ConfigurationForm();
cf.Show();
}else{
if(cf.Visible == false){
cf.Visible == true; // possibly cf.Show();
}
}
This "cf == null" thing does not work! I always get a false as return value,
even when i use this expression on a valid (instanciated) cf object
Ok, i could handle this with try--catch, but this is not a clean solution
anway.
Any more ideas........anybody?
Thanx in advance...
Kerem Gümrükcü