See this code

Sujit Patil replied to Dharma K at 03-Jul-08 02:51

Private Sub Command1_Click()
    ctrlName = "DynTxtBx"
    Set txtObject = Form1.Controls.Add("VB.TextBox", ctrlName)
  With txtObject
    .Visible = True
    .Left = 250
    .Width = 4000
    .Height = 250
    .Top = tValue
    .Text = "This is a dynamically created TextBox No." & CStr(cIndx)
  End With
End Sub

Or you can use this also

Dim c As Control
c = New TextBox()
c.Name = "myControl"
c.Width=200;
c.Height=200;
Me.Controls.Add(c)

Try this code.

You can change the size using WIDHT and HIGHT property of textbox like;

textBox.Height=200;

textBox.Widht=200;

Best Luck!!!!!!!!!!!!!!!
Sujit.


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  Runtime created textbox size how to change the size in runtime ...... vb.net (Windows Application) - Dharma K  03-Jul-08 02:36 2:36:03 AM
      try this... - Vasanthakumar D  03-Jul-08 02:44 2:44:20 AM
      See this code - Sujit Patil  03-Jul-08 02:51 2:51:43 AM
      Solution Runtime created textbox size how to change the size in runtime - Umapathy Kaliaperumal  03-Jul-08 02:52 2:52:19 AM
      You can do this:- - santhosh kumar  03-Jul-08 02:57 2:57:39 AM
      Repy - alice johnson  03-Jul-08 03:09 3:09:51 AM
      Create Textbox - kalit sikka  03-Jul-08 03:33 3:33:39 AM
      here it is - santhosh kapa  03-Jul-08 04:37 4:37:58 AM
      Runtime created textbox size how to change the size in runtime ...... vb.net - Sanjay Verma  04-Jul-08 06:26 6:26:29 AM
View Posts