I'm not very good at explaining things extremely well so please bare with me. First step: Add two text boxes onto your form and 1 button. The first text box will be for your username and the second text box will be for your password. Step Two: double click on your button and add this to your codes. Code: if (textBox1.Text == "Username" && textBox2.Text == "Password") { MessageBox.Show("Login sucessful!"); } else { MessageBox.Show("Username or password incorrect!\nPlease try again!"); } There you go that simple! If you wish to have another form open after you login do the following. Step 1: Create a second windows form. Step 2: Code: if (textBox1.Text == "Username" && textBox2.Text == "Password") { MessageBox.Show("Login sucessful!"); Form2 f2 = new Form2(); f2.Show(); } else { MessageBox.Show("Username or password incorrect!\nPlease try again!"); }
Yea I copied my post off of another site and there code, bb code is messed up, i'll edit my topic real quick