Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button) Select Case Button.Caption Case "1" MsgBox "点击了【功能1】" If Toolbar1.Buttons(1).Value = tbrUnpressed Then Toolbar1.Buttons(1).Value = tbrUnpressed End If Case "2" MsgBox "点击了【功能2】" If Toolbar1.Buttons(2).Value = tbrUnpressed Then Toolbar1.Buttons(2).Value = tbrUnpressed End If Case "3" MsgBox "点击了【功能3】" If Toolbar1.Buttons(3).Value = tbrUnpressed Then Toolbar1.Buttons(3).Value = tbrUnpressed End If End SelectEnd Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
Select Case Button.Caption
Case "1"
MsgBox "点击了【功能1】"
If Toolbar1.Buttons(1).Value = tbrUnpressed Then
Toolbar1.Buttons(1).Value = tbrUnpressed
End If
Case "2"
MsgBox "点击了【功能2】"
If Toolbar1.Buttons(2).Value = tbrUnpressed Then
Toolbar1.Buttons(2).Value = tbrUnpressed
End If
Case "3"
MsgBox "点击了【功能3】"
If Toolbar1.Buttons(3).Value = tbrUnpressed Then
Toolbar1.Buttons(3).Value = tbrUnpressed
End If
End SelectEnd Sub