如图,VB中怎么编写这个题目?题目具体请看下图
1个回答
展开全部
Private Sub Command1_Click()
If Len(Text1) > 0 Then
List1.AddItem Text1
Else
MsgBox "请输入内容", vbInformation, "提示"
End If
End Sub
Private Sub Command2_Click()
List1.RemoveItem List1.ListIndex
End Sub
Private Sub Command3_Click()
List1.Clear
End Sub
Private Sub Form_Load()
Text1 = ""
List1.Clear
Command1.Caption = "增加"
Command2.Caption = "删除"
Command3.Caption = "清除"
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询