Board logo

標題: [發問] 當滑鼠指到CommandButton變色~移開恢復原色~(已完成) [打印本頁]

作者: av8d    時間: 2012-6-17 23:17     標題: 當滑鼠指到CommandButton變色~移開恢復原色~(已完成)

本帖最後由 av8d 於 2012-6-18 00:17 編輯

當滑鼠只到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

回復 1# av8d


  看起來你的目地尚未完成吔!繼續努力吧!
[attach]11432[/attach]




歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)