Wrox Programmer Forums
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 17th, 2003, 03:40 PM
Registered User
 
Join Date: Nov 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mdi Forms

I have a mdi parent form with 2 forms inside it. When it loads I have one main form showing and want to show another form by clicking a button. I also do not want to create more than one instance of the form. Here is my code.
 grid.MdiParent = frmMain.ActiveForm
        grid.Show()
        If grid.Visible = True Then
            grid.BringToFront()
        End If
That works fine until I close my grid form and try to reopen it. I get an error saying that it cannot access a disposed object name. Any help would be appreciated.
Thanks
Tim

 
Old November 27th, 2003, 11:40 PM
Authorized User
 
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You need some code to create an instance of a form with you open it.

For Example:

dim frm as new GridForm
frm.MDIParent = me
frm.Show

Call this each time you open the form.

David





Similar Threads
Thread Thread Starter Forum Replies Last Post
MDI & MDI Child Forms Menu's in VB2005 yulyos Visual Studio 2005 0 September 7th, 2007 09:49 AM
MDI Forms Gustav_Haglund VB How-To 8 December 8th, 2005 07:05 PM
MDI Forms kobystud C# 0 June 7th, 2004 04:14 AM
MDI Forms tim33_909 VB.NET 2002/2003 Basics 1 November 17th, 2003 03:42 PM
MDI Forms? aldwincusi VB How-To 1 September 11th, 2003 04:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.