leañopost2
DESCRIPTION
Database BlogTRANSCRIPT
![Page 1: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/1.jpg)
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
POST #2
By. Jonierick C. Leaňo
BSIT3 Block-1
![Page 2: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/2.jpg)
Step 1. Open the Visual Studio 2012 or C# Application
Step 2. click new Project
![Page 3: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/3.jpg)
Step 3. Select Visual C# and then select Windows Forms Application after that click ok
Edit the name
Of your project
here into log in system
![Page 4: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/4.jpg)
Step 4. Create a Form1 like this As your first form.
Select a control that you want to edit
Its properties
Label3
Label1
Label2
TextBox1
TextBox2
button1
butoon2
![Page 5: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/5.jpg)
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.
1st
2nd
3rd
![Page 6: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/6.jpg)
1st Select this
2nd click this
You can rename this
![Page 7: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/7.jpg)
Step 6.design your Form1 and Form3 just like this.Form2 is almost the same as Form2 except the label1, just rename
the label1 in Form3 to "User:Staff" the rest is the same.
button1
button2
textBox1
label1
label2
label3richTextBox1
dateTimePicker1
![Page 8: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/8.jpg)
Step 7.Here's the coding portion, double click the button1 in Form1.then copy or type the code below:
![Page 9: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/9.jpg)
Continue codingHere…
![Page 10: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/10.jpg)
then copy the code below:
Step 8.Here's the second coding portion, double click the button1 or log in button in Form2
![Page 11: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/11.jpg)
Step 9.the same coding instruction in step 5,double click the button1 in Form3 then copy the code below:
![Page 12: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/12.jpg)
Output
![Page 13: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/13.jpg)
Step 10. F5 to run the program and the output is look like this.
username: admin password: admin or
Username: staff password: staff
Output
![Page 14: LeañoPost2](https://reader030.vdocuments.net/reader030/viewer/2022032515/563db84e550346aa9a927821/html5/thumbnails/14.jpg)
Reference of the program: Thank you I hope
You learn a lot