Hi everyone... i m new to VB... can anybody tell me how can i create a text box control within code...??
thanks in advance...
regards...
Printable View
Hi everyone... i m new to VB... can anybody tell me how can i create a text box control within code...??
thanks in advance...
regards...
A little like this:
That's pretty much it. You can set all of the same properties in code as you can in the form designer.VB Code:
Dim TB As New Textbox With TB .Location = New Point(20, 20) .Size = New Size(50,20) .Text = "This is a test" .Visible = True End With Me.Controls.Add(TB)
Oh, and welcome. :)
If you examine the code that is generated automatically by the form designer (when you drag and drop a new textbox onto a form) you'll get a good idea of how its done. :thumb:
oh ! thats exactly wat i was lookin' for... thanks buddies.... u rock... :wave: