[VB6 ] 如何刪除自創物件
我的程式碼
Option Explicit
Dim WithEvents objLbl As Label
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 5
Set objLbl = Controls.Add("VB.Label", "Lbl" + CStr(i))
With objLbl
.Move i * 220, i * 800, 520, 520
.Caption = objLbl.Name
.AutoSize = True
.Visible = True
End With
Next i
End Sub
想問一下怎樣可以次刪除Lbl1到Lbl5
或是把objLbl清空?
另外想問
objLbl應該不是物件吧
那應該是什麼
(應為這程式是在網路上看到的)
THANKS!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.230.128.123
→
06/15 08:51, , 1F
06/15 08:51, 1F
→
06/15 08:52, , 2F
06/15 08:52, 2F
Visual_Basic 近期熱門文章
PTT數位生活區 即時熱門文章