VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering

You are here: Visual Basic > Advanced VB6 tutorial > Chapter 3

Adding Controls to Forms in VB6

You can place controls on the surface of a valid VB container object. Standard container objects in VB include:

  • Forms
  • PictureBoxes
  • Frames

Although Image controls and PictureBox controls have many features in common, Image controls cannot act as containers. You can use two different methods to add controls to a form or other container object.

The first method uses a mouse double-click and requires the following steps:

3.2 Adding Controls to Forms: Method 1

  1. Select the form or other container object (such as a PictureBox or Frame) where you wish to add the control

  2. Double-click the control's icon in the ToolBox. A new instance of the control will appear in the selected container.

With the second method, you draw the control on the container surface by following these steps:

3.3 Adding Controls to Forms: Method 2
  1. Single-click the control's icon in the ToolBox.

  2. Release the mouse button and move the mouse pointer to the position on the container where you want to locate the control.

  3. Hold down the mouse button and draw a rectangle on the container surface to indicate the size and position for the control instance.


<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved