property ScrollBar.VisiblePart(Part as PartEnum) as Boolean
Indicates whether the specified part is visible or hidden.

TypeDescription
Part as PartEnum A PartEnum expression or a combination of PartEnum expressions being shown or hidden
Boolean A boolean expression that indicates whether the part is visible or hidden
The VisiblePart property specifies which part is visible and which part is hidden. The VisibleParts property is similar to VisiblePart property, excepts that all parts must be specified. By default, when a part becomes visible, the EnablePart property is automatically called, so it becomes enabled. The control fires the ClickPart event when the user clicks a part of the control. The ClickingPart event is fired continuously while the user keeps clicking the part of the control. Use the Background property to specify a visual appearance for a specified part of the control in a certain state. Use the OrderParts to specify the order of the buttons in the scroll bar.

By default, the following parts are shown:

For instance the following VB sample adds two additional buttons to the left/up side of the control:

With ScrollBar1
    .VisiblePart(exLeftB1Part Or exLeftB2Part) = True
End With

The following VB sample displays a message when the user clicks the exLeftB1Part part of the control:

Private Sub ScrollBar1_ClickPart(ByVal Part As EXSCROLLBARLibCtl.PartEnum)
    If (Part = exLeftB1Part) Then
        MsgBox ("Click")
    End If
End Sub

For instance the following VB.NET sample adds two additional buttons to the left/up side of the control:

With AxScrollBar1
    .set_VisiblePart(EXSCROLLBARLib.PartEnum.exLeftB1Part Or EXSCROLLBARLib.PartEnum.exLeftB2Part, True)
End With

The following VB.NET sample displays a message when the user clicks the exLeftB1Part part of the control:

Private Sub AxScrollBar1_ClickPart(ByVal sender As System.Object, ByVal e As AxEXSCROLLBARLib._IScrollBarEvents_ClickPartEvent) Handles AxScrollBar1.ClickPart
    If (e.part = EXSCROLLBARLib.PartEnum.exLeftB1Part) Then
        MsgBox("Click")
    End If
End Sub

For instance the following C++ sample adds two additional buttons to the left/up side of the control:

m_scrollbar.SetVisiblePart( 32768 /*exLeftB1Part*/ | 16384 /*exLeftB2Part*/, TRUE );

The following C++ sample displays a message when the user clicks the exLeftB1Part part of the control:

void OnClickPartScrollbar1(long Part) 
{
	if ( Part == 32768 /*exLeftB1Part*/ )
		MessageBox( "Click" );
}

For instance the following C# sample adds two additional buttons to the left/up side of the control:

axScrollBar1.set_VisiblePart(EXSCROLLBARLib.PartEnum.exLeftB1Part | EXSCROLLBARLib.PartEnum.exLeftB2Part, true);

The following C# sample displays a message when the user clicks the exLeftB1Part part of the control:

private void axScrollBar1_ClickPart(object sender, AxEXSCROLLBARLib._IScrollBarEvents_ClickPartEvent e)
{
    if (e.part == EXSCROLLBARLib.PartEnum.exLeftB1Part)
        MessageBox.Show("Click");
}

For instance the following VFP sample adds two additional buttons to the left/up side of the control:

with thisform.ScrollBar1
	.VisiblePart(bitor(32768,16384)) = .t.
endwith

The following VFP sample displays a message when the user clicks the exLeftB1Part part of the control:

*** ActiveX Control Event ***
LPARAMETERS part

if ( part = 32768 )
	wait window "click"
endif