Hai all,
Here is my problem.I want to create the label controls and text box ,list box,command button based on the user requirement to generate the form.Anyone can help me in this please.
Thanks in advance
Printable View
Hai all,
Here is my problem.I want to create the label controls and text box ,list box,command button based on the user requirement to generate the form.Anyone can help me in this please.
Thanks in advance
If you have VB6 you can add controls using the Controls collection of the form.
Best regardsVB Code:
Dim txtBox As TextBox Set txtBox = Me.Controls.Add("VB.TextBox", "txtUniqueName") txtBox.Move 10, 10, 2000, 300 txtBox.Visible = True
Hai Joacim Andersson,
Thanks a lot Master.
There is another way if you are interested. If you have one control of a kind (ex. text1(textbox)). Set its index to 0. Now in runtime to load another control just use
VB Code:
Load text1(1) Load text1(2) text1(1).visible = true text1(1).left = text1.left + 200 'or just move it so it isn't under the other control