The ScrollableControl class has 2 protected boolean properties: HScroll and VScroll.
As the document says:
Gets or sets a value indicating whether the horizontal scroll bar is visible.
And
AutoScroll maintains the visibility of the scrollbars automatically. Therefore, setting the HScroll or VScroll properties to true have no effect when AutoScroll is enabled.
So I use them like this, but the scrollbar isn't showed:
class MyScrollableControl : ScrollableControl {
public MyScrollableControl() {
this.AutoScroll = false;
this.HScroll = true;
}
}
If I use the following code, it works:
this.HorizontalScroll.Visible = true;
When I put them torgether, the scrollbar is still invisible, and the values of HScroll and HorizontalScroll.Visible keep False.
this.AutoScroll = false;
this.HScroll = true;
this.HorizontalScroll.Visible = true;
So what is the real use of HScroll and VScroll ?
Update
My code and test

HScrollproperty does not affect scroll visibility directly, but it prevent Scroll to be hidden withHorizontalScroll.VisiblevalueIn case when
HorizontalScroll.Visibleis set totruethanHScrollwill also get a valuetrue(see 2nd line in the table)In case when
AutoScrollis set to trueHorizontalScroll.Visiblealways staystrueandHScrolldoesnot have any influense (see last 2 lines)Make an app with Control that contains 3 buttons with next handler code, and play with it to see what exactly happening there:
Usage (AutoScroll =
false)To Manually show Scroll set
HorizontalScroll.VisibletotrueTo Manually hide Scroll set
HScrolltofalseand thanHorizontalScroll.VisibletofalseUsage (AutoScroll =
true)HorizontalScroll.Visibleis alwaystrueand cannot be changedHScrolldoesnot affects anything