start-up form

P

Peter

My application start-up form is a login form. Normally, it
will close when user gives right user name and password.
It is easy to be done by calling Form.close in VB6.0,
however, the .NET start-up form has a peculiar feature:
when you close the start-up form, all other forms are
automatically close and the application terminates. How
can I close login form and not terminate the application?
(I tried using Hide() but it is not what I want)

Thank you!
 
I

Ian Cooper

Peter,
In addition to Herfried's response note that your login dialog could be displayed with ShowDialog() - which gives it a message loop, before you make the call to Application.Run for the main form. After all it is a login dialog and you probably want to check the DialogResult of the login dialog before proceeding.
Ian Cooper
wwww.dnug.org.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top