| Author: UltimateRengan 18 Jul 2008 | Member Level: Diamond | Rating: Points: 1 |
Hi
Form 1:---
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim second As New Form2 second.Show() Me.Hide() End Sub End Class
Form2:----
Public Class Form2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim first As New Form1 first.Show() End Sub End Class
i hope this may help u
UltimateRengan nathan.rengan@gmail.com Trichy-Rider Group
|
| Author: Abhijeet Kumar 18 Jul 2008 | Member Level: Gold | Rating: Points: 4 |
As per my undertsanding you do not want to open a new instance of the Main form, but open the same instance as opened before.
For this, when you open second form, do not close the Main form but just hide it. and when you want to open it again, jus make it visible again, or call show, do not create any instance of it.
|