Excellent suggestion. It was also allowing multiple copies of the forms to
be spawned. Using your approach I solved both problems with ...
private void mnuHelp_Click( Object sender, System.EventArgs e )
{
Form frm = new frmHelp( );
private_ShowDialog( frm );
}
private void mnuAbout_Click( Object sender, System.EventArgs e )
{
Form frm = new frmAbout( );
private_ShowDialog( frm );
}
private void private_ShowDialog( Form frm )
{
this.mnuContext[3].Enabled = false ;
this.mnuContext[4].Enabled = false ;
frm.ShowDialog( this );
this.mnuContext[3].Enabled = true ;
this.mnuContext[4].Enabled = true ;
}
Thanks for the help.
--
-- Thom Little --
www.tlaNET.net -- Thom Little Associates, Ltd.
--
"mdb" <m_b_r_a_y@c_t_i_u_s_a__d0t__com> wrote in message
news:Xn****************************@207.46.248.16. ..
"Thom Little" <th**@tlanet.net> wrote in
news:Oe**************@TK2MSFTNGP12.phx.gbl:
You could disable each menu item before the ShowDialog calls... eg...
private void mnuHelp_Click( object sender, System.EventArgs e )
{
Form frm = new frmHelp( );
mnuAbout.Enabled = false;
frm.ShowDialog( this );
mnuAbout.Enabled = true;
}
and
private void mnuAbout_Click( object sender, System.EventArgs e )
{
Form frm = new frmAbout( );
mnuHelp.Enabled = false;
frm.ShowDialog( this );
mnuHelp.Enabled = true;
}
-mdb