by King (24 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 29th October 2003
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Creating objects on runtime such as command button textbox very easy check it out
API Declarations
dim withevents command1 as commandbutton
Set text1 = Me.Controls.Add("vb.textbox", "text1", Me)
Set Command1 = Me.Controls.Add("vb.commandbutton", "command1", Me)
Command1.Visible = True
End Sub
you can use all controls such as optionbutton , checkbox , button , textbox ect..
I have only explained how to create a button at runtime . So try to make other objects by yourself . Wait for my next code that will be quite intresting.
write this code on the form_load as show
The disadvantage of this application is that only one object can be displayed at a time
my next version will show you how to add objects at runtime
so enjoy this code . If you have any suggesstions you are free to ask me at [email protected]
No comments have been posted about Creating objects on runtime such as command button textbox very easy check it out. Why not be the first to post a comment about Creating objects on runtime such as command button textbox very easy check it out.