VB第6题速答
1个回答
展开全部
Private Sub Form_Load()
List1.Clear
Randomize
For i = 1 To 20
List1.AddItem Int(Rnd(i) * (100 - 1) + 1)
Next i
End Sub
Private Sub List1_Click()
Label2.Caption = List1.List(List1.ListIndex)
Label4.Caption = List1.ListIndex + 1
Label6.Caption = List1.ListCount
End Sub
Private Sub List1_DblClick()
List1.RemoveItem (List1.ListIndex)
Label6.Caption = List1.ListCount
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询