100% found this document useful (1 vote)
19 views

Log in System

This program create a Log in System that loads different forms for every user type and if the user type "admin" then the form2 will load, then if the user type "staff" the form3 will load

Uploaded by

Dada Comerciase
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
19 views

Log in System

This program create a Log in System that loads different forms for every user type and if the user type "admin" then the form2 will load, then if the user type "staff" the form3 will load

Uploaded by

Dada Comerciase
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

This program create a Log in System that loads different

forms for every user type and if the user type "admin"
then the form2 will load, then if the user type "staff" the
form3 will load

Step 1. Open the Visual Studio


2012 or C# Application

Step 2. click new Project

Step 3. Select Visual C# and then select Windows Forms


Application then click ok

Edit the name of


your
project here

Step 4. Create a Form1 like this As your first form.

Label3
Label1
Label2

TextBox
1
TextBox
2
button1
button2

Select a control that you want


to edit its properties

Step 5. Add two forms as your Form2 and Form3. just right click the
highlighted word logInSystem, then select Add after that select Windows
form and then just enter and no
need to rename. To Add form3 just do it again the instruction in step 2.

2nd
3rd

1st

First Select this

You can rename


this

Second Select
this

Step 6. Design your Form2 and Form3 just like this. Form2 is
almost the same as Form3 except the label1, just rename the
label1 in Form3 to "User:Staff" the rest is the same.
Label3

Label1
Label2

richTextBox
1

button1
button2

dateTimePicke
r1

Step 7.Here's the coding portion, double click the button1 in


Form1.
Then copy or type the code below:

Continue coding

Step 8. Here's the second coding portion, double click the


button1 or log in button in Form2. Then copy the code
below:

Step 9.the same coding instruction in step 5,double click


the button1 in Form3 then copy the code below:

Output

Step 10. F5 to run the program and the output is


look like this.
username: admin password: admin or
Username: staff password: staff

Output

References:

You might also like