专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > VB Dotnet

急怎么设置Button单击

发布时间:2011-06-23 16:03:19 文章来源:www.iduyao.cn 采编人员:星星草
急!如何设置Button单击
Private Sub SetToolBarState(ByVal bState As Boolean)
  '设置Button的是否能够单击
  ToolBar1.Buttons("0").Enabled = bState
  ToolBar1.Buttons("1").Enabled = bState
  ToolBar1.Buttons("2").Enabled = bState
  ToolBar1.Buttons("3").Enabled = bState
  ToolBar1.Buttons("4").Enabled = bState
  ToolBar1.Buttons("5").Enabled = bState
  ToolBar1.Buttons("6").Enabled = bState
  ToolBar1.Buttons("7").Enabled = Not bState
  ToolBar1.Buttons("8").Enabled = Not bState
  End Sub
出现异常,未将对象引用设置到对象的实例。如何改正?

------解决方案--------------------
ToolBar1.Buttons(0).Enabled = bState 

index不要引号

  
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) 
http://feiyun0112.cnblogs.com/
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: