# 以程式建立控制项的问题请教?

Posted by 洪扬 on December 14, 1998 at 22:07:43:

我事先在Form上拉出一个frame,然后在frame里放一个Label,
frame及Label的index属性都设为1(也就是两者都是控制项阵列),
为什么程式执行之后,只看得到Frame,却看不到Label,请问关键在那里?
我程式码如下:
Private Sub Form_Load()
Dim i As Integer, t As Long, k As Integer
For i = 2 To 60
Load DeskFrame(i)
Load DeskLabel(i)
Next
t = 72
For i = 1 To 60
k = i Mod 10
DeskFrame(i).Move IIf(k = 0, 10, k) * 850, t
DeskFrame(i).Visible = True
DeskFrame(i).Caption = i
DeskFrame(i).BackColor = RGB(238, 123, 155)
DeskLabel(i).Move IIf(k = 0, 10, k) * 850 , t
DeskLabel(i).Visible = True
If i Mod 10 = 0 Then
t = t + 650
End If
Next
End Sub

Follow Ups:

- 漏了一行啦! 小吴 08:30:39 12/15/98 (0)