I have this code at the top of the form
And the following on a command button. The same problem exist on all objects. Once the mouse moves over the object it changes to 14pt red but does not chanhe back after you move the mouse back to black.
Any help would be appreciated
Never give up never give in.
There are no short cuts to anything worth doing
Code:
Private Function Hover(Optional pstrName As String)
Static sstrHover As String
If sstrHover = pstrName Then Exit Function
If Len(sstrHover) Then
' remove hover effect
With Me(sstrHover)
Select Case .ControlType
Case acTextBox
.ForeColor = vbBlack
.FontSize = 11
.FontBold = True
If .Controls.Count Then .Controls(0).ForeColor = vbBlack
Case acRectangle
.BorderColor = vbBlack
Case acLabel
.ForeColor = vbBlack
.FontSize = 11
'If .Controls.Count Then .Controls(0).ForeColor = vbBlack
Case acCommandButton
.ForeColor = vbBlack
.FontSize = 11
.FontBold = True
End Select
End With
End If
sstrHover = pstrName
If Len(sstrHover) Then
' set hover effect, change font color
With Me(sstrHover)
Select Case .ControlType
Case acTextBox
.ForeColor = vbRed
.FontSize = 14
If .Controls.Count Then .Controls(0).ForeColor = vbRed
Case acRectangle
.BorderColor = vbRed
Case acLabel
.FontSize = 14
.ForeColor = vbRed
'If .Controls.Count Then .Controls(0).ForeColor = vbRed
Case acCommandButton
.ForeColor = vbRed
.FontSize = 14
End Select
End With
End If
End Function
And the following on a command button. The same problem exist on all objects. Once the mouse moves over the object it changes to 14pt red but does not chanhe back after you move the mouse back to black.
Code:
Private Sub Command95_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Hover Command95.Name
End Sub
Any help would be appreciated
Never give up never give in.
There are no short cuts to anything worth doing