0% found this document useful (0 votes)
19 views

Post 2

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

Uploaded by

Lanie Gamayon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Post 2

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

Uploaded by

Lanie Gamayon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 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
Submitted By: Lanie M. Gamayon
IT3B1

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

S T E P 4 . C R E AT E A F O R M 1 L I K E T H I S A S YO U R
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.

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.

S T E P 7. H E R E ' S TH E C O D IN G P O RT IO N ,
D O U B L E C L I C K TH E BUT TO N 1 I N F O RM 1 .
T H E N C O P Y O R TY P E TH E C O D E BE LO W:

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 BUT TON1 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

REFERENCE:

You might also like