Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

My start up form asked the user the correct password , if password is correct , the main form displayed and close the star up form.

 

Dim main as new mainform

if passowrd = txtpassword.text then

main.showdialog()

me.close()

else

(retry ....)

 

 

The main form can be displayed , but the starup form still would not be closed , but at the back of main form.

 

Anyone knows ?

Posted

I'd rather use the mainForm as the startup form.

 

In the main forms load method, I'd show the password form and pass the validity check back to the main form. Then you can dispose the password form.

.nerd
Posted

The problems is when main form loaded first , we must disabled the toolbar and main menu before the user can successfully login.

 

Do you have idea how to disabled these two control , and how to enabled it back after the user login ?

Posted

public sub mainForm_Load(byval sender as object, e as eventargs)

dim myForm as New PasswordForm

myForm.ShowDialog

end sub

 

This will load your password form as a Dialog, meaning that the user may not do anything on the main form until you let them basically.

(make the controlbox property false to ensure they don't just close it and use the form anyway)

i'm not lazy i'm just resting before i get tired.
Posted

I posted an example on how to solve this problem, you can close any form and keep your application running, attached you'll find it (I think is the correct example, if not, let me know)

 

regards

Fat kids are harder to kidnap

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...