You are on page 1of 10

C#

Designer &
Code View
VERA A. PANAGUITON
Two Types of Views in Visual CSharp
The Designer View is
where you design your
form and change its
properties.

The Code View is where


you write your code.

APDEV I by Vera A. Panaguiton 2


Login Form

Change the Name property of every control to be used for


coding. Make sure to add a suffix (lbl for label, tb for
textbox, btn for button, etc.) for the corresponding controls.
APDEV I by Vera A. Panaguiton 3
Create a MainForm with 4
buttons.

APDEV I by Vera A. Panaguiton 4


Get Data from Form
The login process goes this way,
inputting data to the form and
clicking the log in button. To get
to the code view, double click the
login button. It will automatically
create a method for button click.

Type your code here.

APDEV I by Vera A. Panaguiton 5


Declare variables for the
two textboxes and assign
the values of the variables.

Check if data inputted


is correct.

Show error message


if incorrect.

APDEV I by Vera A. Panaguiton 6


If username and password are
correct Mainform is displayed
else the Message Box.

APDEV I by Vera A. Panaguiton 7


Add 4 more forms for all
the buttons.

APDEV I by Vera A. Panaguiton 8


Copy the Code for the buttons.

APDEV I by Vera A. Panaguiton 9


- END -

APDEV I by Vera A. Panaguiton 10

You might also like