I am a VB.NET newbie working on a simple Pocket PC application.
I used the following code to switch my forms.
In form 1:
Dim Form2 As New Form2
Form2.Show()
Me.Hide()
In form 2:
Dim Form1 As New Form1
Form1.Show()
Me.Hide()
It does what just the way I wanted, but I have read that hiding the form is not disposing or closing it. It will not release resources. I am going to have quite a number of forms and I wonder if there will be any problems(PPC application). From my code, it will create a new instance of a form whenever the user switchs form.
I have tried the code below, but the Form2 just wouldn't appear
Dim Form2 As New Form2
Form2.Show()
Me.Close()
or
Me.Hide()
Me.Close()
Should I add the Close() or Dispose() code? If yes, where should I add it?
What is the differences between Close() or Dispose()?
Thanks a lot
I used the following code to switch my forms.
In form 1:
Dim Form2 As New Form2
Form2.Show()
Me.Hide()
In form 2:
Dim Form1 As New Form1
Form1.Show()
Me.Hide()
It does what just the way I wanted, but I have read that hiding the form is not disposing or closing it. It will not release resources. I am going to have quite a number of forms and I wonder if there will be any problems(PPC application). From my code, it will create a new instance of a form whenever the user switchs form.
I have tried the code below, but the Form2 just wouldn't appear
Dim Form2 As New Form2
Form2.Show()
Me.Close()
or
Me.Hide()
Me.Close()
Should I add the Close() or Dispose() code? If yes, where should I add it?
What is the differences between Close() or Dispose()?
Thanks a lot