Keep the form inputs after hiding
Hi,
I'm using the following code to show and hide a form...
I'm showing form2 by clicking a button in form1 and again showing the form1 by clicking a buttin in form2...
I'm not closing ant of the form..i just hide it...
but i couldn't keep the inputs of Form2...don't know why????
VB Code:
In form1 button click
--------------------------
Dim nf As New form2
nf.MyForm = Me
nf.Show()
Me.Hide()
In form2 General Declaration
-------------------------------------
Private pf As form1
Public Property MyForm() As form1
Get
Return pf
End Get
Set(ByVal Value As form1)
pf = Value
End Set
End Property
In form2 button click event
---------------------------------
If pf Is Nothing Then
Dim pf As New form1
pf.Show()
Me.Hide()
Else
pf.Show()
Me.Hide()
End If
I'm very thankful if anybody helps me......
:cool: