|
-
January 21st, 2000, 03:03 PM
#1
New control in the code
How can I create a new control (like a TextBox)
in the code???
Is it possible???
Help me please...
Isabelle
-
January 21st, 2000, 03:23 PM
#2
Re: New control in the code
If you have VB6, you can add control directly to the Controls Collection, eg.
private Sub Command1_Click()
Controls.Add "VB.Textbox", "Text1"
me!Text1.Move 0, 0
me!Text1.Text = Text1
me!Text1.Visible = true
End Sub
Otherwise, you could create a Control Array of Invisible Textboxes at DesignTime, (Create1 and Set the Index to Zero), then load the Textboxes as you need them, eg.
private Sub Command1_Click()
Load Text1(1)
Text1(1).Move 0, 0
Text1(1).Caption = Text1
Text1(1).Visible = true
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
January 24th, 2000, 09:27 AM
#3
Re: New control in the code
And for a Control Array???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|