How To Make A Simple Login System In C#

login form
Everyone knows what a login system is ! so i don't think any explanations are needed . i will come to the main thing , Today we are going to make a simple login system in c# .

You need two text boxes,two labels and two buttons.

Now make the controls look like this on form.form login
Now let's go for login button codes
   //if textbox1 text is admin and textbox2 text is 1234567
            if ((textBox1.Text == "admin") && (textBox2.Text == "1234567"))
                //then show form2
                Form2 nextform = new Form2();
                //if username and password is incorrect show this message box
                MessageBox.Show("Username or Password Invalid");
This is the code for button 2 which is a exit button
Alright we are done ! I hope this is helpful !


How can We change the shape of the Button?
I want to make the textbox, buttons etc edges more rounded...
Can you help me with this?




Post a Comment

Note: Only a member of this blog may post a comment.