Form OnClose()

  • Thread starter Thread starter GVN
  • Start date Start date
G

GVN

Hi,

I have two projects in my solution explorer. Say ProjA, ProjB. In
ProjA I have a form called ProjAForm. In ProjB I have another form
called ProjBForm. Now in ProjAForm, under a button click, I want to
load ProjBForm in modeless fashion. I can load as many forms as I want
in this manner. In ProjAForm OnClosing event I would like to know the
object names of all the modeless forms that are loaded. Is it possible?
Can any one help me in this regard?

Thanks,
GVN.
 
Hello Matthias,

Thank you. It worked. But what is the case if I have ProjectC,
ProjectD, which also has access to ProjectBForm and raises that form?
Will this Singleton functionality help me> Please advise me in this
context.

Thanks,
GVN.
 
Hi,

I have two projects in my solution explorer. Say ProjA, ProjB. In
ProjA I have a form called ProjAForm. In ProjB I have another form
called ProjBForm. Now in ProjAForm, under a button click, I want to
load ProjBForm in modeless fashion. I can load as many forms as I want
in this manner. In ProjAForm OnClosing event I would like to know the
object names of all the modeless forms that are loaded. Is it possible?
Can any one help me in this regard?

Thanks,
GVN.

Why not keep a list of the open forms by adding a reference to them to a List<T>
object and when the parent form closes, loop through it and close the children?
Each form that was capable of opening another form would keep this list, making
the destruction (closing) of the child forms recursive.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 
Hi!

Of cause it will help you. The Singleton can beplaced in a separate dll
(Assembly), which is accessible over all of your projects.

Bye,
 
Back
Top