Here is an example which shows how it must be done :
<
Private HostControl As RMBaseSlider = Nothing
Public Overrides Sub Initialize(ByVal component As System.ComponentModel.IComponent)
MyBase.Initialize(component)
HostControl = DirectCast(component, RMBaseSlider)
End Sub
Protected Overrides Function GetHitTest(point As System.Drawing.Point) As Boolean
If HostControl IsNot Nothing Then
Dim myPoint As Point
If HostControl.ShowStepButtons Then
myPoint = HostControl.ButtonLeft.PointToClient(point)
If HostControl.ButtonLeft.ClientRectangle.Contains(myPoint) Then Return True
myPoint = HostControl.ButtonRight.PointToClient(point)
If HostControl.ButtonRight.ClientRectangle.Contains(myPoint) Then Return True
End If
myPoint = HostControl.Slider.PointToClient(point)
If HostControl.Slider.ClientRectangle.Contains(myPoint) Then Return True
End If
Return MyBase.GetHitTest(point)
End Function
This is a code-snippet out of one of my Control-Designers.
Here I have a Slider which contains 2 Buttons.
The GetHitTest delivers a TRUE to the Designer if the Mouse is located over one of these Buttons ...
I think that could help you ...