[求助]关于listview和imagelist绑定使用的问题
我将listview和imagelist绑定,用以在listview1中显示图片,但是,出现了如下问题:代码如下:
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
ListView2.ListItems.Clear
On Error Resume Next
Select Case Item.Text
Case "资料管理"
Set itmx = ListView2.ListItems.Add(, , "增加资料")
itmx.Icon = 1
Set itmx = ListView2.ListItems.Add(, , "修改资料")
itmx.Icon = 24
Case "资料查询"
Set itmx = ListView2.ListItems.Add(, , "姓名查询")
itmx.Icon = 12
Set itmx = ListView2.ListItems.Add(, , "生日查询")
itmx.Icon = 9
end select
end sub
Private Sub ListView2_ItemClick(ByVal Item As MSComctlLib.ListItem)
On Error Resume Next
Select Case Item.Text
Case "增加资料"
Txl_NewAdd.Show 1
Case "修改资料"
Txl_Edit.Show 1
Case "姓名查询"
Txl_FindName.Show 1
Case "生日查询"
Txl_FindBirthday.Show 1
end select
end sub
图像完全显示出来了,当点击“增加资料”时,txl_newadd显示出来了,但是listview2中的图标随着鼠标到处乱动,不知道是什么原因,请哪位高手赐教