Lab 01
Lab 01
2. Place three Buttons on the form, and change their properties as follows:
a) Change buttons titles to “Ok, Exit, Disable “(text).
b) Change buttons names to “Ok, Ex, Dis “(Name).
c) Set the buttons size to 50 x 50 (size).
d) Set the location for the ok button to be 60,60. And the Exit button to be
150,60.
e) Disable any button and notice the change (Enable).
f) Set the visible property to be false for any button and notice the change
(visible).
4. Drag a Textbox to the current form, and change the following Form
properties:
h) Enable your textbox to contain several lines (Multiline)
i) Show scrollbars in the textbox (ScrollBars).
j) Enable your textbox to create a new line whenever you reach the border.
(WordWrap).
k) Add a default value to your textbox (Text).
l) Change the font color in the textbox (forecolor)
m) Forbid user to write in the textbox (Readonly)
n) Forbid user access to the textbox (Enabled)
o) Use your textbox for entering a password (PasswordChar)
p) Use your textbox for entering a password, using the system symbol
(UseSystemPasswordChar).
q) Add other 3 textboxes.
r) Change the TabIndex property for each textbox, so that the navigation
between them will change.
Exercise 1:
a) Change Title: Changes the title of the form according to the text entered in
the textbox (title).
b) Show/Hide: Shows and hides the label, the textbox and the button of the
Title.
c) Join: Joins the first name and last name inserted in the textboxes, and stores
the results in Full Name.
a. Use + operator
b. Use AppendText Method.
d) Go to Title: transfers the focus to Title Textbox
e) Repeat the code written in Join button, so that it occurs in "Textchanged"
event.
Exercise:
Add a Button "Hide", in the form above, to hide the "Greetings GroupBox".