EricDotNet Posted March 23, 2004 Posted March 23, 2004 I try a Window Form can inheritance, but MDI Form cannot. Anyone can help me? Thank! Quote
*Experts* mutant Posted March 23, 2004 *Experts* Posted March 23, 2004 Would you mind explaining your problem a little bit more? Quote
EricDotNet Posted March 23, 2004 Author Posted March 23, 2004 I can inheritance MDI form la, But there are other problems: I don't want to see a child MDI form is displayed twice. (i.e. I don't have two instances showing) In parent MDI form, a button click event: Dim childForm As frmRefTable childForm = childForm.getInstance() childForm.MdiParent = Me childForm.Show() childForm.BringToFront() In Child MDI form, Public Shared frmChildForm As frmRefTable Public Shared Function getInstance() As frmRefTable If frmChildForm Is Nothing Then frmChildForm = New frmRefTable End If Return frmChildForm End Function It seem to be work, but when i close the child form and open child form again, Error display: An unhandled exception of type 'System.ObjectDisposedException' occurred in system.windows.forms.dll Additional information: Cannot access a disposed object named "frmRefTable". Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.