Marthijn Mulder


I made a custom control with AutoScroll set to true.

How do I know if the vertical scrollbar is enabled (visible) or not

And how do I know the width of this scrollbar (I need to know this for resizing the controls).



Re: .NET Compact Framework UserControl Scrollbars

Peter Vrenken

Hello Marthijn!

Is this posting of any use to you PostID=696104&SiteID=1

it P/Invokes GetSystemMetrics to request the SM_CXVSCROLL value.

The article on MSDN linked to below describes scrollbars in detail:

It also lists the different system metrics that can be acquired.


Peter Vrenken.

P.S. Don't i know you from somewhere