Dim MousePress As Boolean, MouseOver As Boolean
Private Sub CmdToday_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If MousePress Then Exit Sub
CmdToday.Picture = DownImage
MousePress = True
End Sub
Private Sub CmdToday_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If MouseOver Then Exit Sub
CmdToday.Picture = OverImage
MouseOver = True
End Sub
Private Sub CmdToday_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Not MousePress Then Exit Sub
CmdToday.Picture = UpImage
MousePress = False
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Not MouseOver Then Exit Sub
MouseOver = False
MousePress = False
CmdToday.Picture = UpImage
End Sub
|