Exemple #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;
 }
 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);
 }
Exemple #3
0
 public static extern int SetScrollInfo(IntPtr hwnd, int fnBar, [In] ref NativeStructs.SCROLLINFO lpsi, bool fRedraw);
Exemple #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);
 }
Exemple #5
0
 public static extern bool GetScrollInfo(IntPtr hwnd, int fnBar, ref NativeStructs.SCROLLINFO ScrollInfo);