|
-
January 17th, 2000, 05:46 AM
#1
Create TextBox (Code)
Please Help,
I want to create a TextBox on a Form by creating it with Code.
(Not select it with a mouse and drag and drop it on the Form!)
In that Code I want to set all its properties. How can I do this?
Thanks
-
January 17th, 2000, 07:09 AM
#2
Re: Create TextBox (Code)
in VB 6
private Sub Command1_Click()
Dim tx as Control
set tx = me.Controls.Add("VB.TextBox", "test")
tx.Visible = true
End Sub
-
January 17th, 2000, 07:27 AM
#3
Re: Create TextBox (Code)
Thanks,
Just what I needed!
Maarten
-
January 17th, 2000, 12:59 PM
#4
Re: Create TextBox (Code)
why dont you have the textbox already on the form, but set the visiblility to false, and set the properties by text1.whatever.
-
January 17th, 2000, 01:47 PM
#5
Re: Create TextBox (Code)
How to make it work in VB5???
-
January 17th, 2000, 04:15 PM
#6
Re: Create TextBox (Code)
Add a textbox on the form, and make it Index 0, and set visible to false.
In code,
Load TextBox1(1)
TextBox1(1).Left = 100
TextBox1(1).Top = 200
TextBox1(1).Visible = true
Crazy D :-)
"One ring rules them all"
-
January 17th, 2000, 10:11 PM
#7
Re: Create TextBox (Code)
I need to make it as by "code" something like addcontrol thingy, so I was wondering if I could add control in vb some similar way, thanks tho for replying
-
January 18th, 2000, 03:12 AM
#8
Re: Create TextBox (Code)
The only other way I can think of is use CreateWindow API but that's a bit of a pain.. Load .... is the closest you can get in VB5.
Crazy D @ Work :-)
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
|