The code you posted has some compilation issues. But here is the modified
code that I used and it seemed to work as expected.
Public Class HoverLinkLabel
Inherits System.Windows.Forms.LinkLabel
Public Sub New()
MyBase.New()
End Sub
Private _hoverColor As Color = MyBase.LinkColor
Private _linkColor As Color = MyBase.LinkColor
Public Property HoverColor() As Color
Get
Return _hoverColor
End Get
Set(ByVal Value As Color)
_hoverColor = Value
End Set
End Property
Protected Overrides Sub OnMouseEnter(ByVal e As System.EventArgs)
MyBase.OnMouseEnter(e)
Me.LinkColor = _hoverColor
End Sub
Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs)
MyBase.OnMouseLeave(e)
Me.LinkColor = _linkColor
End Sub
End Class

Signature
Tim Wilson
.Net Compact Framework MVP
Hi Tim... thanks for your reply. The compilation issue stems from a missing
ControlsHelper class. I failed to remove that before posting. The problem I
was having was that VS.NET wasn't letting me put my derived LinkLabel
control onto a form. But... using the same code, I'm able to choose the
control from within another project. Weird.... it won't show up in the
toolbox like my other controls unless I force it to. Then, when I try to
insert it in a form, it simply does nothing. VS won't draw it on a form.
So.... I don't know what's wrong. None of my other controls have this
problem. But....luckily I'm able to use it from my other project, which is
how I need it anyway.
Thanks for your input, I appreciate it.
-Michael
> The code you posted has some compilation issues. But here is the modified
> code that I used and it seemed to work as expected.
[quoted text clipped - 28 lines]
> End Sub
> End Class
"Jeffrey Tan[MSFT]" - 06 May 2005 07:14 GMT
Hi Michael,
Have you tried Tim's modified sample code? Does your problem still go with
Tim's sample code?
Currently, I suggest you create a new project and paste your sample code,
does this problem occur? Also, you may test your project on some other
machines. Does this problem go away?
With these tests, we can determine if this problem is machine-specific or
project-specific. If you have any further concern, please feel free to
feedback. Thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.