By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,157 Members | 891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,157 IT Pros & Developers. It's quick & easy.

How to dispose the login screen

P: n/a
After the login has been authenticated successfully, I written the
code below to call the main form:

dim loMainForm as new MainForm
MainForm.ShowDialog()
Me.close

What happend is the MainForm is display but the login screen still
havent been disposed until I close the MainForm, what's wrong with my
code? May I have your advise? Thanks.

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Vincent,

As you use "mainform", than for good programming that should be the main
form (not for the compiler however for readability of your program).

There is no need for code to show it, because that is automatically done
after the load event (When you do not close it in the load event).

A showdialog can be an extra form, to show up during the loading of the form
to get some user information.

As a very simplified sample, (it can much nicer)
\\\
Private sub LoadEvent ......................................
dim frm as myPasswordChecking
frm.showdialog
if frm.passwordOK = False then me.close
frm.dispose
End sub
///

I hope this helps?

Cor

"appearinggalaxy" <vi**********@hotmail-dot-com.no-spam.invalid>
After the login has been authenticated successfully, I written the
code below to call the main form:

dim loMainForm as new MainForm
MainForm.ShowDialog()
Me.close

What happend is the MainForm is display but the login screen still
havent been disposed until I close the MainForm, what's wrong with my
code? May I have your advise? Thanks.

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.