Closing a form in VB.NET

  • Thread starter Thread starter E9
  • Start date Start date
E

E9

I'm trying to do something I thought was simple. I have a form which I use
as a login screen. Once the user successfully supplies the password, I want
to open another form and then close the login form. I can open the second
form, however, if I try to close the login form by writing code in the
second form's Load event, nothing happens. Any suggestions are greatly
appreciated.

E9
 
On your Main method call first the Login form, catch the return code and
open the application form if the return code is OK.

In your code, the application form is called by the login form which "lock"
the process on the call method. That's why the Login doesn't close.
 
Hi E9,

I think in another way about that.

In my mainform I want to start a dialog.

For that I open a dialogscreen.
That is very easy to handle, because there is a special showdialog.

It could go like this

\\\\
dim frm as form2
frm.showdialog
dim mypassword = frm.password ' this is a read only property or just a
public value
dim myuser = frm...............
frm.dispose
///

I hope this helps,

Cor
 
Back
Top