VB中,按钮单击了则按钮背景图片换成已经单击了图片,单击了其它按钮又将前一个已经单击的按钮图片变为原来没有单击的图片
VB中,按钮单击了则按钮背景图片换成已经单击了图片,单击了其它按钮又将前一个已经单击的按钮图片变为原来没有单击的图片
[解决办法]
也就是点击显示一个图片,弹起显示一个图片吧?
设置按钮的Style属性为1
Option Explicit
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Command1.Picture = LoadPicture(App.Path & "\Down.ico")
End If
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Command1.Picture = LoadPicture(App.Path & "\Up.ico")
End If
End Sub