vb logo

 

Visual Basic Books
Home
Visual Basic Beginner Books
Visual Basic Database Books
Visual Basic ActiveX Books
Visual Basic Advanced Books
VB Internet Programming Books

Resources
Visual Basic Links
Add a Link
Subscribe to Mailing List

Visual Basic Books

Microsoft Visual Basic 6 Professional (step by step)

Add the number labels

Now add the labels used to display the numbers in the program. A label is a special user interface element designed to display text, numbers, or symbols when a program runs. When the user clicks the Lucky Seven program’s Spin button, three random numbers appear in the label boxes. If one of the numbers is a seven, the user hits the jackpot.

  1. Click the Label control in the toolbox, and then place the mouse pointer over the form.

Label control

The Label control is selected, and the mouse pointer changes to crosshairs when it rests on the form.

  1. Create a small rectangular box like the one shown below.

The label object you have created is called Label1, the first label in the program. Now you’ll create two more labels, named Label2 and Label3, on the form.

  1. Click the Label control, and then draw a label box to the right of the first label.

Make this label the same size as the first. The caption "Label2" will appear in the label.

  1. Click the Label control again and add a third label to the form, to the right of the second label.

The caption "Label3" will appear in the label.

next page....
Email us your comments:mail
Fax: 1(916)404-7719
©1999 Valassis Enterprises. All rights reserved.