Re: Have one window close another window. by Martin
Martin
Sat Jan 07 01:00:24 CST 2006
You overload the constructor method of the second window this way :
public SecondForm(Form ParentForm)
{
Initialize();
[...]
}
This way you have an pointer to handle the first form from the second one
and call Close() or anything else (if public).
Don't forget to call the Initilize method within it.
--
Martin CLAVREUIL
www.miagazine.com
"UJ" <fred@nowhere.com> a écrit dans le message de news:
%23oMe7fvEGHA.648@TK2MSFTNGP14.phx.gbl...
>I have an app that opens a main window. There's a condition where another
>window will open and from that window I want to be able to close the first
>window.
>
> How do I do this?
>
> TIA - Jeff.
>