Visual Basic


Home Introduction

Lesson 3- Working with Properties



Step 1:





For this lesson, we'll work with the Controls you were experimenting with last lesson. We'll only do a few because once you get the jist of it, it's pretty self-explanitory. Let's begin by clicking on your Button. Look over to the right in your Properties. Find the Text Property. Give your Button a name, it can be anything you want. Next, find your Font and ForeColor Properties. Play with those and decide on a font, color, and size.



Step 2:



How about we add a picture to that empty PictureBox? In Properties, search for the Image Property. The Select Resource Box will pop up. Click the Local resource radio button. From there, select Import. Choose a picture of your choice. Select OK. Notice how the picture may not fit the box? That's an easy fix! Locate SizeMode in the Properties and choose AutoSize.



Step 3:







Let's work a little on that TextBox. In our Properties, locate Text. Go ahead and add a message. Next, locate BackColor. You guessed it, choose a color. Notice that it changed the background of the TextBox. Finally, locate TextAlign. For the purpose of this lesson, choose Center.