Creating objects on runtime such as command button textbox very easy check it out
Creating objects on runtime such as command button textbox very easy check it out
API Declarations
dim withevents command1 as commandbutton
Rate Creating objects on runtime such as command button textbox very easy check it out
(1(1 Vote))
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]
Creating objects on runtime such as command button textbox very easy check it out Comments
No comments yet — be the first to post one!
Post a Comment