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

#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.
Marianie B. Gaitan
BSIT3-BL1

STEP 1 : Open the


Visual Studio

Step 2. Click New


Project

STEP 3: Select Visual C# and select WindowsForm


Application and click OK.

Edit your project


name

STEP 4. CREATE A FORM1 AS YOUR FIRST FORM.

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.

Second
step
Third
step

First
step

FIRST

SECOND

STEP 6: Design your Form 1,2 &3. Form 2 is almost the same
with Form 3 except the labels just rename the label in form 3
and the rest is the same.

STEP 7.HERE'S THE CODING PORTION, DOUBLE CLICK THE BUTTON1 IN


FORM1 AND COPY OR TYPE THE CODE BELOW:

Continue
coding
here

Step 8.Here's the second coding portion, double click the button1 or log in button in Form2.

COPY THE CODE BELOW:

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


CLICK THE BUTTON1 IN FORM3 AND 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

END

You might also like