Unload ME?

  • Thread starter Thread starter sam
  • Start date Start date
S

sam

I want to know how to unload form / application in VB.Net.

In VB 6, the coding is Unload Me but how about VB.Net?


VB.Net 1.1 Coding
--------------------
Private Sub InitializeComponent()
Me.SuspendLayout
'MainForm

Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(336, 126)
Me.Controls.Add(Me.label3)
Me.Controls.Add(Me.label2)
Me.Controls.Add(Me.label1)
Me.Name = "MainForm"
Me.Text = "MainForm"
AddHandler Load, AddressOf Me.MainFormLoad
Me.ResumeLayout(False)
Me.Close
End Sub

Please help.

Many thanks.
 
I want to know how to unload form / application in VB.Net.

In VB 6, the coding is Unload Me but how about VB.Net?


VB.Net 1.1 Coding
--------------------
Private Sub InitializeComponent()
Me.SuspendLayout
'MainForm

Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(336, 126)
Me.Controls.Add(Me.label3)
Me.Controls.Add(Me.label2)
Me.Controls.Add(Me.label1)
Me.Name = "MainForm"
Me.Text = "MainForm"
AddHandler Load, AddressOf Me.MainFormLoad
Me.ResumeLayout(False)
Me.Close
End Sub

Please help.

Many thanks.

Hi

In vb.net you create the instace of the form with the form2=NEW Form2
staement and destroy the instance with the Me.Close() / form2.Close()

You can form2.show or Form2.Hide between the creation and distruction.

I'm no expert but seems like no-one else wanted to answer you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top