devxlogo

Dynamic Control

Dynamic Control

Question:
How can I create dynamic controls, such as a textbox, without a basic control in the form ?

Answer:
In VB6 you can add new controls to the Controls collection as follows:

Controls.Add (ProgID, name, container)

The progid for the standard VB controls are VB.CommandButton, VB.Textbox, etc.

devx-admin

Share the Post: