Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 14

POST #2

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
Pass By: De Vera, Pyke Danrenz
BSIT3 B1

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 AFTER THAT CLICK OK

Edit the name


Of your project
here into log in
system

STEP 4. CREATE A FORM1 LIKE THIS AS YOUR FIRST FORM.


Label 3

Textbox
1
Textbox
2

Label 1
Label 2

Button 1
Button 2

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

1st Select
this

2nd click this

You can rename


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.
Label 1

Label 3

Rich text
box 1

Textbox
1
Button 1
Button 2

Date time picker


1

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
THEN COPY THE CODE BELOW:
Form2

STEP 9.THE SAME CODING INSTRUCTION IN STEP 5,DOUBLE


CLICK THE BUTTON1 IN FORM3 THEN COPY THE CODE
BELOW:

Outpu
t

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


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

Outpu
t

REFERENCE:

You might also like