vb中双击使列表框其中的一个项目使其消失的代码怎么写
发布网友
发布时间:2022-06-03 00:58
我来回答
共1个回答
热心网友
时间:2023-10-09 12:02
'前提:给窗体加个 listbox 名为:list1
Private Sub Form_Load()
Me.List1.AddItem "a"
Me.List1.AddItem "b"
Me.List1.AddItem "c"
Me.List1.AddItem "d"
Me.List1.AddItem "e"
Me.List1.AddItem "f"
Me.List1.AddItem "g"
Me.List1.AddItem "h"
Me.List1.AddItem "i"
Me.List1.AddItem "j"
Me.List1.AddItem "k"
End Sub
Private Sub List1_DblClick()
Me.List1.RemoveItem Me.List1.ListIndex
End Sub追问Private Sub list1_dblclick()
Me.List1.RemoveItem
Me.List1 .ListIndex
End Sub
能帮我检查一下吗?这样写怎么不对啊
追答你那么写,代码逻辑是错的,要按照vb的代码逻辑写程序
按照我的写的看它的代码逻辑