コード例 #1
0
 private void EnableScroll(bool enable)
 {
     if (enable)
     {
         UnsafeNativeMethods.EnableScrollBar(new HandleRef(this.parent, this.parent.Handle), this.Orientation, 0);
     }
     else
     {
         UnsafeNativeMethods.EnableScrollBar(new HandleRef(this.parent, this.parent.Handle), this.Orientation, 3);
     }
 }
コード例 #2
0
ファイル: ScrollProperties.cs プロジェクト: sven82/winforms
 /// <include file='doc\ScrollProperties.uex' path='docs/doc[@for="ScrollProperties.EnableScroll"]/*' />
 /// <devdoc>
 ///     Internal helper method for enabling or disabling the Vertical Scroll bar.
 /// </devdoc>
 /// <internalonly/>
 private void EnableScroll(bool enable)
 {
     if (enable)
     {
         UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.Handle), Orientation, NativeMethods.ESB_ENABLE_BOTH);
     }
     else
     {
         UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.Handle), Orientation, NativeMethods.ESB_DISABLE_BOTH);
     }
 }