Creating forms programmatically
Visual Basic
4
Posts
4
Posters
0
Views
1
Watching
-
How can I create a form programmatically without having any form in my project in the first place. That means without using reference for an existing form. Instead referencing directly the Form object. Pilgrim
-
In visual basic 6.0 we cannot create any control dynamically without having reference with existing object.
It is true for the forms - they cannot be created without a reference to existing form. However, you *can* create other controls without references to existing controls. Following code works:
Dim txtTest As TextBox Set txtTest = Controls.Add("VB.TextBox", "txtTest") txtTest.Move 100, 100, 1000, 300 txtTest.Visible = True
-
In visual basic 6.0 we cannot create any control dynamically without having reference with existing object.