2 replies
by z_nziramasanga Accepted solution
by tony hopkinson Accepted solution
Create a new form
Stick labels and textboxes on it to display login details.
set the passwordchar property of the password textbox, so the password can't be seen as it's typed in. (* is the usual one)
In the OK and Cancel buttons set the DialogResult property.
In the form code define two public properties that read from and write to to the TextBox's texts properties.
Then in your mainform
add a login button, menu option ...
in the click event
frmLogin LoginForm;
LoginForm = new frmLogin()
LoginForm.UserName = DBUserName;
if (LoginForm.ShowDialog == DialogResult.OK)
{
DBPassword = LoginForm.Password;
}
LoginForm.Close();
This discussion is closed to new replies.
Trending Networks posts
Sort by Trending