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 4

Creating Data Input Forms and Dialog Boxes in Visual Basic 6

( Click here for Contents )

This chapter extends the ideas introduced in Chapter 3, "Implementing Navigational Design," and describes further steps you can take to provide the user with a functioning data input form or dialog box.

You may include several standard 32-bit ActiveX controls on your form to enhance your Visual Basic application's user interface. These controls organize data and provide different ways of presenting information to the user, give you additional means of displaying information about the environment, and also provide the means for you—as a developer—to manipulate data and controls.

Here is a brief description of what the ActiveX controls discussed in this chapter do:

  • The ImageList control gives you a means of loading graphics files, such as icons and bitmaps, into your application for use with other controls.
  • You can use the ListView control to organize data in lists.
  • The ToolBar control lets you quickly build toolbars in your application, giving users an alternative to the menu for performing actions.
  • You can add the StatusBar to a form to present information about the environment to the user through text messages and progress bars.

We then discuss control arrays that allow your application to dynamically create and destroy controls as the application runs.

Next we examine the related concept of a form's Controls Collection that you can use to manipulate controls without referencing each by name.

Turning our attention to the manipulation of forms, we first discuss the different techniques for managing forms programmatically.

Finally we talk about how to manipulate the loaded forms in an application without referencing each form by name. As you might expect from the earlier description of the Controls Collection, we will use the Forms Collection.


  1. Adding an ActiveX Control to the ToolBox

  2. Using the ImageList Control
              ListImage Object and ListImages Collection
              Add and Remove Methods
              Draw Method
              Overlay Method
              ImageHeight and ImageWidth Properties
              MaskColor and UseMaskColor Properties

  3. Using the TreeView Control
              Node Object and Nodes Collection
              Add and Remove Methods
              EnsureVisible and GetVisibleCount Methods
              TreeView Properties
              TreeView Events

  4. Using the ListView Control
              ListItem Object and ListItems Collection
              View Property
              Icon and SmallIcon Properties
              Arrange Property
              ColumnHeader Object and ColumnHeaders Collection
              SubItems Property

  5. Using the ToolBar Control
              Button Object and Buttons Collection
              Style Property
              Appearance Properties
              Add and Remove Methods
              Customizing Toolbars

  6. Using the StatusBar Control
              Panel Object and Panels Collection
              Add and Remove Methods
              Using the Controls Collection

  7. Techniques for Adding and Deleting Controls Dynamically
              Adding and Deleting Controls Dynamically Using Control Arrays
              Adding and Deleting Controls Dynamically Using the Controls Collection
                        Getting a Control's ProgID
                        Declaring an Intrinsic Control and Programming Its Events
                        Declaring an ActiveX Control and Programming Its Events
                        Adding and Removing a Control in the Controls Collection
                        Keeping a Reference in the Project to an ActiveX Control
                        Managing the License for an ActiveX Control

  8. More on Creating Data Input Forms and Dialog Boxes
              Loading form objects into memory and unloading them
              Showing and hiding forms from the screen
              Showing how VB Form objects are stored

  9. Using the Forms Collection
              Using Methods and Properties of the Forms Collection
              Using Specific Items Within the Forms Collection
              Looping Through the Forms Collection
              Using the Forms Collection to Verify Whether a Form Is Loaded
              Using the Forms Collection to Unload All Forms


Get Started >>

Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved