Label: Regain VB6
From MSDN-2001-OCT: visual tools and programming ages/Visual Studio 6.0 documentation/Visual Basic documentation/using Visual Basic/programmer's Guide/Part 1: Visual Basic basics/programming Fundamentals/Working with objects
(1) For simplicity, most of the material outside of this chapter won't make sure references to an object's class. Just remember that the term"List box Control, "For example, means"An instance of The ListBox class."
(2) object Layers
You must be familiar with at least two object hierarchies in VB6: (1) object hierarchies from other application components; (2) Data Access Object hierarchies.
There are two main methods to construct an object hierarchy in VB6: (1) collections; (2) Containers (such as a form containing controls ).
(3) about set:
The objects contained in the collection object are called Member objects of the collection object.
The index number of the Set member starts from 0.
To access a specific member, use the name or number as follows:
Controls("List1")Controls! List1 controls(3)
The most common collection objects in VB6 are forms, controls, and printers. However, according to Zhao Tiao, collection is not a base class or interface. Like forms and printers, it is an implementation of ienumvariant. Please refer to the eighth floor of this post.
(4) about containers:
You can use the container property to change an object's witiner within a form.
The following controls can contain other controls: frame control, picture box control, Toolbar Control
(5) about new:
using new with the set statement is faster and is the recommended method.
you can't use new to create : a variable of any generic object type , or of any specific control type, or of any specific control.
there are four generic object types in Visual Basic: object, form, control, mdiform. note that mdiform is only for future extension Instead of using it in sequence, use a specific class such as mdiform1.