Posted By

sekihin on 09/17/10


Tagged

vb6


Versions (?)

Create Controls Dynamically


 / Published in: Visual Basic
 

URL: http://hanatyan.sakura.ne.jp/patio/read.cgi?no=66

  1. -----------------------------------------------------------------
  2. Re: ����������� - �� 2004/03/22-16:52 No.8466
  3. -----------------------------------------------------------------
  4.  
  5. VB6 以����次�������
  6.  
  7. Text1, Text2, Command1 ��������置���
  8. ��������������
  9. # ������ Text2 � Index � 0 ����������
  10.  
  11. Text1 ����質��場���������������������
  12. ����� Text2 ��������
  13.  
  14. '----------------------------------------
  15. Option Explicit
  16. Private Sub Command1_Click()
  17. Dim i As Integer
  18. For i = 1 To Text2.UBound
  19. Unload Text2(i)
  20. Next i
  21. For i = 1 To CInt(Text1.Text)
  22. Load Text2(i)
  23. With Text2(i)
  24. .Top = (Text2(0).Height + 30) * i
  25. .Visible = True
  26. End With
  27. Next i
  28. End Sub
  29. Private Sub Form_Load()
  30. Text2(0).Visible = False
  31. Text1.Text = "10"
  32. End Sub

Report this snippet  

You need to login to post a comment.