2

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

description

log in system

Transcript of 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.

#2

Marianie B. Gaitan

BSIT3-BL1

Step 2. Click New Project

STEP 1 : Open the Visual Studio

Edit your project name

STEP 3: Select Visual C# and select WindowsForm Application and click OK.

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.

First step

Second step

Third 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 codinghere

COPY THE CODE BELOW:

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

STEP 9: THE SAME CODING INSTRUCTION IN STEP 5,DOUBLE CLICK THE BUTTON1 IN FORM3 AND 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

END