两个菜单按钮,我想实现1按下2弹起,2按下1弹起的互斥效果,为什么下边的不行?
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1:
Toolbar1.Buttons(1).Value = tbrPressed
Toolbar1.Buttons(2).Value = tbrUnpressed Case 2: Toolbar1.Buttons(1).Value = tbrUnpressed
Toolbar1.Buttons(2).Value = tbrPressed
End Select
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1:
Toolbar1.Buttons(1).Value = tbrPressed
Toolbar1.Buttons(2).Value = tbrUnpressed Case 2: Toolbar1.Buttons(1).Value = tbrUnpressed
Toolbar1.Buttons(2).Value = tbrPressed
End Select
End Sub
解决方案 »
- winsock下载的奇怪的现象
- 大哥们,关于系统调用问题给小弟一个提示吧
- 急!如何把文本框text内容全部打印出来?
- 帮我看一下。关于chm的。 谢谢
- 数据类型问题
- 请问如何下载文件,并来帮我看看这个代码
- 如何将图表保存成一个bmp图象文件
- TMD,别人用C,编写了一个歌词编辑器,159K,我用VB编写了一个同样功能的,1590K,(自认为比他编得好)!该死的MS!该死的运行库!!
- winsock控件采用udp协议,在用bind方法中发生错误
- CrystalReport的SQLQuery问题
- 为什么要等我command__Click执行完了,winsock才能更新服务器端的数据?
- 关于控件中出现(“may be outdated”)的问题
Toolbar1.Buttons(1).Value = tbrUnpressed
Toolbar1.Buttons(2).Value = tbrUnpressed
Toolbar1.Buttons(3).Value = tbrUnpressed
Toolbar1.Buttons(Button.Index).Value = tbrPressed Toolbar1.Refresh
前面可以通过循环来实现
多谢!
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1:
Toolbar1.Buttons(1).Value = tbrPressed
Toolbar1.Buttons(2).Value = tbrUnpressed
Toolbar1.Refresh
Case 2: Toolbar1.Buttons(1).Value = tbrUnpressed
Toolbar1.Buttons(2).Value = tbrPressed
Toolbar1.Refresh'加上这个
End Select
End Sub