Link to home
Start Free TrialLog in
Avatar of apm825
apm825

asked on

Dynamically Creating Controls at Run time in VB6

How do you dynamically create Controls at Run time WIITHOUT using a control array. I want the control not to be on the form at design time...then create it dynanically at run time.

Thanks!
Avatar of Bahnass
Bahnass
Flag of Egypt image

from msdn


Private Sub Form_Load()
   Form1.Controls.Add "VB.CommandButton", "cmdObj1", Frame1
   With Form1!cmdObj1
      .Visible = True
      .Width = 2000
      .Caption = "Dynamic Button"
   End With
End Sub

Avatar of Éric Moreau
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Tim
Am I Fast typist !!!!!
You were indeed quicker than me with effectively the same answer, do you want some points for it?
Dear Tim
    Nice 2 meet U     .....   even if U have my points ;-)