Yes, you are right - the login form will still be in memory after calling
Hide(). But if you made login form as the startup, I believe that is the
only option.
How about calling those two forms separately from Main()?
Eg:
Dim x As New frmLogin
If (x.ShowDialog() = DialogResult.OK) Then
Application.Run (New frmMain())
End If
Of course, the above code requires that you assign DialogResult.OK to
frmLogin's DialogResult property on successful login.
Hello Shiva,
Thank you for your answere
But my code is shown below, which is written in the button_Click procedure
block
Dim MainFrm As New frmMain
MainFrm.Show()
Dim LoginFrm As New frmLogin
LoginFrm.Hide()
frmLogin is the StartUp object, on successfully login it opens frmMain.
If I hide frmLogin but still it is visible to the user.
If I hide the form, the form is still residing in the memory. Am I correct?
If so my application will be slower.
Regards
Partha