在VB中,当列表框中没有选定的项目时,按钮不可操作的代码
在form_onload里面加上
button1.enable=false
然后再列表框中的点击事件中加上
if not list1.ListIndex=-1 then
button.enable=true
end if
在form_onload里面加上
button1.enable=false
然后再列表框中的点击事件中加上
if not list1.ListIndex=-1 then
button.enable=true
end if