如何在VB中使用load )函數(shù)加載label
1 回答

慕運(yùn)維8079593
TA貢獻(xiàn)1876條經(jīng)驗 獲得超5個贊
首先要在窗體上添加一個label控件,將其的index屬性設(shè)置為0(創(chuàng)建控件數(shù)組),然后代碼如下:
Private Sub Command1_Click()
Dim i As Integer
For i = 2 To 5
Load Label1(i)
Label1(i).Caption = "Label1" & i
Label1(i).Visible = True
Label1(i).Top = i * 500
Next i
End Sub
添加回答
舉報
0/150
提交
取消