算了我还有一点就做完了还是问个问题吧
vb吧
全部回复
仅看楼主
level 2
想要左键单击按钮之后按钮变红,右键单击恢复原色的代码怎么写啊[泪]
2020年06月19日 11点06分 1
level 2
康康孩子吧[泪]就剩这个了我已经尽力了[泪]
2020年06月19日 12点06分 2
level 12
用mouseclick事件,判断按钮是左还是右。然后改变按钮背景色
2020年06月19日 12点06分 3
level 13
'Command1的Style属性设置为1
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Command1.BackColor = vbRed
ElseIf Button = vbRightButton Then
Command1.BackColor = vbButtonFace
End If
End Sub
2020年06月19日 12点06分 4
大佬为啥弹出"过程声明与同名事件不相符“什么的
2020年06月19日 12点06分
@谢谢惠顾的海角 你有多个Command控件,估计变成控件数组,直接用我的代码是不行的,Button as Integer之前加Index as integer,
2020年06月19日 12点06分
@隨風🍁缒夢 还是有点问题[泪]点击按钮出现未找到方法或数据成员
2020年06月19日 12点06分
@谢谢惠顾的海角 把代码中的Command1改成Command1(Index)即可
2020年06月19日 12点06分
1