Results 1 to 2 of 2

Thread: Creating Text Boxes At Runtime

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    England
    Posts
    135
    Hi,

    Is it actually possible to create text boxes, etc at runtime, or do they need to be created at design time. If this is the case, can anyone provide me with the code to create an array or something like that for VB 5.

    Cheers,
    Sparky

  2. #2
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    Drop a textbox and a command button on the form.
    Make sure Text1.Index is assign to 0

    Code:
    Dim X
    Dim SpaceDistance
    
    Private Sub Command1_Click()
       X = X + 1
       Load Text1(X)
       SpaceDistance = SpaceDistance + Text1(X).Width
       
       Text1(X).Text = X
       Text1(X).Top = 0
       Text1(X).Left = 0 + SpaceDistance
       Text1(X).Visible = True
    End Sub
    Chemically Formulated As:
    Dr. Nitro

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width