Windows Develop Bookmark and Share   
 index > Windows Forms Sample Applications > object cannt be disposed
 

object cannt be disposed

sir,

i am creating VB.NET windows application.how to link mdi to another form

palanivels  Friday, June 08, 2007 7:02 AM

Hi palanivels,

Do this change: Project �Properties�Application tab→Shutdown mode = "When last form closes". Then try something like this:

Code Snippet

Sub linkBt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles linkBt.Click

Dim f As Form = New Form()

f.Text = "New Linked Form"

f.StartPosition = FormStartPosition.Manual

f.Location = Me.Location

f.Size = Me.Size

f.Show()

Me.Close()

End Sub

Hope this helps.

Regards

Rong-Chun Zhang  Monday, June 11, 2007 4:53 AM

Hi palanivels,

Do this change: Project �Properties�Application tab→Shutdown mode = "When last form closes". Then try something like this:

Code Snippet

Sub linkBt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles linkBt.Click

Dim f As Form = New Form()

f.Text = "New Linked Form"

f.StartPosition = FormStartPosition.Manual

f.Location = Me.Location

f.Size = Me.Size

f.Show()

Me.Close()

End Sub

Hope this helps.

Regards

Rong-Chun Zhang  Monday, June 11, 2007 4:53 AM

You can use google to search for other answers

Custom Search

More Threads

• Real time updates?
• Where I can get Terrarium sources?
• Canadian Terrarium Contest
• Left pane problem -- newbie question
• tab pages
• Document Tracking and Workflow
• I need help with a load button
• HELP!! There are no animals!
• Hi
• Incorrect parameter