Suppose I have two forms. one is Monitor, another is ConnectionProperties.
When I click connect button from Monitor, the ConnectionProperties form is popped up. After inputting the data in the ConnectionProperties form and pressed OK, the ConnectionProperties is hidden.
The source code of OK Button is :
However, When I click "connect" button from Monitor again, all of the values from the ConnectionProperties were disappeared. How can i restore these values?
go to the ConnectionProperties again...
When I click connect button from Monitor, the ConnectionProperties form is popped up. After inputting the data in the ConnectionProperties form and pressed OK, the ConnectionProperties is hidden.
The source code of OK Button is :
VB.NET:
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
ipHost = txtAddress.Text
Try
port = Convert.ToInt16(txtPort.Text)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
usrName = txtUserName.Text
pwd = txtPassword.Text
Me.Hide() 'usrName, pwd, ipHost, port are the fields of ConnectionProperties
End Sub
go to the ConnectionProperties again...