Search code examples
c#winformsuser-controlsscrollbar.net-1.1

Check if a scroll bar is visible in .net Framework 1.1 user control


I am working in .Net framework 1.1 winforms . In usercontrol i want to detect both Horizontal and Vertical Scrollbar Visibility . But In .Net Framework 1.1 there is no property or method to detect the scrollbar visibility.


Solution

  • VScroll and HScroll protected boolean properties are available since .NET 1.1.

    They allow you to check if the vertical and horizontal scrollbars are visible. They return true if the corresponding scrollbar is visible, otherwise return false.