CodeItBetter Programming Another VB Programming Blog

How to add Controls at Run-Time

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'Controls - How to add Controls at Run-Time

Option Explicit
 
'Add TextBox to your form.
'In the textbox Property change the Index propery to 0

Private Sub Form_Load()
    Load Text1(1)
    Text1(1).Left = 400
    Text1(1).Top = 400
    Text1(1).Visible = True
    'To add another textbox, simply add:
    'Load Text1(2)
    'Text1(2).Left = 400
    'Text1(2).Top = 200
    'Text1(2).Visible = True
    'And so on ...
End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.