Esempio n. 1
0
 public static NativeStructs.SCROLLINFO GetScrollInfo(Control ctrl, NativeEnums.SB direction)
 {
     NativeStructs.SCROLLINFO info = new NativeStructs.SCROLLINFO();
     info.cbSize = Marshal.SizeOf(info);
     info.fMask = (int)NativeEnums.SIF.ALL;
     NativeMethods.GetScrollInfo(ctrl.Handle, (int)direction, ref info);
     return info;
 }
Esempio n. 2
0
 public static NativeStructs.SCROLLINFO GetScrollInfo(Control ctrl, NativeEnums.SB direction)
 {
     NativeStructs.SCROLLINFO info = new NativeStructs.SCROLLINFO();
     info.cbSize = Marshal.SizeOf(info);
     info.fMask  = (int)NativeEnums.SIF.ALL;
     NativeMethods.GetScrollInfo(ctrl.Handle, (int)direction, ref info);
     return(info);
 }
Esempio n. 3
0
 public static extern int SetScrollInfo(IntPtr hwnd, int fnBar, [In] ref NativeStructs.SCROLLINFO lpsi, bool fRedraw);
Esempio n. 4
0
 public void ScrollTo(int value)
 {
     NativeStructs.SCROLLINFO inf = new NativeStructs.SCROLLINFO();
     inf.fMask = (uint)NativeEnums.SIF.POS;
     inf.nPos = value;
     NativeMethods.SetScrollInfo(this.TargetControl.Handle, (int)(Orientation == ScrollOrientation.VerticalScroll ? NativeEnums.SB.VERT : NativeEnums.SB.HORZ), ref inf, true);
 }
Esempio n. 5
0
 public static extern bool GetScrollInfo(IntPtr hwnd, int fnBar, ref NativeStructs.SCROLLINFO ScrollInfo);