當滑鼠只到CommandButton變色
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CommandButton1.BackColor = &H80000018
End Sub
移開恢復原色請問是哪一個指令?謝謝
有MouseLeave嗎?
或是說當滑鼠移動到工作表上時作用~是否有這個指令?
-----------------------------------------------------------------------------------------------------------------------------------------------
找到解決方法了~(如下這是唯一暫時能用的方法)
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CommandButton1.BackColor = &H80000018
CommandButton2.BackColor = &HFFFFFF
CommandButton3.BackColor = &HFFFFFF
End Sub
Private Sub CommandButton2_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CommandButton2.BackColor = &H80000018
CommandButton1.BackColor = &HFFFFFF
CommandButton3.BackColor = &HFFFFFF
End Sub
Private Sub CommandButton3_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CommandButton3.BackColor = &H80000018
CommandButton1.BackColor = &HFFFFFF
CommandButton2.BackColor = &HFFFFFF
End Sub作者: oobird 時間: 2012-6-18 08:36