Creating TextBox dynamically in VB6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • farhad
    New Member
    • Sep 2006
    • 17

    #1

    Creating TextBox dynamically in VB6

    Hi

    How can I create TextBox dynamically in myVB project ?
  • albertw
    Contributor
    • Oct 2006
    • 267

    #2
    Originally posted by farhad
    Hi

    How can I create TextBox dynamically in myVB project ?
    hi
    don't know if this is possible, but why don't you just create a textbox in designtime and set .visible=false ?
    you may use .move and .visible=true during run-time.

    Comment

    • albertw
      Contributor
      • Oct 2006
      • 267

      #3
      Originally posted by albertw
      hi
      don't know if this is possible, but why don't you just create a textbox in designtime and set .visible=false ?
      you may use .move and .visible=true during run-time.
      hi
      creating textboxes (or any object) dynamically is possible when you use an array.
      e.g:
      create a textbox named Text1 and set the Index=0
      then put

      For i=1 to 30
      Load Text1(i)
      Next i

      now you have loaded 30 extra textboxes

      For i=0 to 30
      With Text1(i)
      .Visible=True
      .Move 100,i*200,1400, 285
      end With
      Next i

      or something

      Comment

      Working...