property Slider.PartFromPoint (X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS) as PartEnum
Retrieves the part from the point.

TypeDescription
X as OLE_XPOS_PIXELS A single that specifies the current X location of the mouse pointer. The x values is always expressed in client coordinates.
Y as OLE_YPOS_PIXELS A single that specifies the current X location of the mouse pointer. The x values is always expressed in client coordinates.
PartEnum A PartEnum expression that indicates the part from the point.
The PartFromPoint property specifies the part of the control from the cursor. Use the ValueFromPoint property to determine the value from the cursor. Use the VisiblePart or VisibleParts property to specify the visible parts of the control.

The following VB sample jumps to the value from the point when the user clicks the upper or lower part of the control:

Private Sub Slider1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With Slider1
        If (0 <> (.PartFromPoint(-1, -1) And exBackgroundPart)) Then
            .Value = .ValueFromPoint(-1, -1)
        End If
    End With
End Sub

The following VB.NET sample jumps to the value from the point when the user clicks the upper or lower part of the control:

Private Sub AxSlider1_MouseDownEvent(ByVal sender As System.Object, ByVal e As AxEXSLIDERLib._ISliderEvents_MouseDownEvent) Handles AxSlider1.MouseDownEvent
    With AxSlider1
        If (0 <> (.get_PartFromPoint(-1, -1) And EXSLIDERLib.PartEnum.exBackgroundPart)) Then
            .Value = .get_ValueFromPoint(-1, -1)
        End If
    End With
End Sub

The following C++ sample jumps to the value from the point when the user clicks the upper or lower part of the control:

void OnMouseDownSlider1(short Button, short Shift, long X, long Y) 
{
	if ( m_slider.GetPartFromPoint(-1,-1) & 640 )
		m_slider.SetValue( m_slider.GetValueFromPoint(-1,-1) );
}

The following C# sample jumps to the value from the point when the user clicks the upper or lower part of the control:

private void axSlider1_MouseDownEvent(object sender, AxEXSLIDERLib._ISliderEvents_MouseDownEvent e)
{
    if ( 0 != ( axSlider1.get_PartFromPoint(-1,-1) & EXSLIDERLib.PartEnum.exBackgroundPart ) )
        axSlider1.Value = axSlider1.get_ValueFromPoint(-1, -1);
}

The following VFP sample jumps to the value from the point when the user clicks the upper or lower part of the control:

*** ActiveX Control Event ***
LPARAMETERS button, shift, x, y

with thisform.slider1
	if ( 0 # bitand( .PartFromPoint(-1,-1), 640) )
		.Value = .ValueFromPoint(-1,-1)
	endif
endwith