Public UserID As String, Password As String
Private Sub MainForm_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
MessageBox.Show("User ID : " & UserID & vbCrLf & _
"Password : " & Password)
End Sub
'If Then
Dim NewMainForm As New MainForm
NewMainForm.UserID = Me.TextBoxUserID.Text
NewMainForm.Password = Me.TextBoxPassword.Text
NewMainForm.Show()
Me.Close()
'End If