@msdn=http://msdn.microsoft.com/en-us/library/windows/desktop/bb787579%28v=vs.85%29.aspx @pinvoke=http://pinvoke.net/$$$.htm Summary: The EnableScrollBar API !!!!C# Signature: [DllImport("user32.dll")] static extern bool EnableScrollBar(IntPtr hWnd, uint wSBflags, uint wArrows); !!!!VB.NET Signature: <DllImport("user32.dll", SetLastError:=True)> _ Private Shared Function EnableScrollBar(ByVal hWnd As IntPtr, <MarshalAs(UnmanagedType.U4)>wSBflags As SBFlags, <MarshalAs(UnmanagedType.U4)>wArrows As SBArrows) As <MarshalAs(UnmanagedType.Bool)>Boolean End Function !!!!VB Signature Public Declare Function EnableScrollBar Lib "user32" _ (ByVal hWnd As Long, _ ByVal wSBflags As SBFlags, _ ByVal wArrows As SBArrows) As Long !!!!User-Defined Types: [SBFlags], [SBArrows] !!!!Notes: None. !!!!Tips & Tricks: Please add some! !!!!Sample Code: Disables the HScroll bar for a specified control. Works on all types that inherit from Control. '''C# Code Snippet''' [Flags] enum SBTYPES { SB_HORZ = 0, SB_VERT = 1, SB_CTL = 2, SB_BOTH = 3 } [Flags] enum SBArrows { ESB_ENABLE_BOTH = 0, ESB_DISABLE_BOTH = 3, ESB_DISABLE_LEFT = 1, ESB_DISABLE_RIGHT = 2, ESB_DISABLE_UP = 1, ESB_DISABLE_DOWN = 2, ESB_DISABLE_LTUP = 1, ESB_DISABLE_RTDN = 2 } [DllImport("user32.dll", SetLastError = true)] static extern bool EnableScrollBar(IntPtr hWnd, uint wSBflags, uint wArrows); private void DisableHScrollBar(Control control) { EnableScrollBar(control.Handle, (uint)SBTYPES.SB_HORZ, (uint)SBArrows.ESB_DISABLE_BOTH); } !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: EnableScrollBar@msdn on MSDN
Edit user32.EnableScro...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.