//===================================================================== /// <summary> /// Get the 32-bit thumb position of the specified scrollbar in the specified control /// </summary> /// <param name="handle">The handle to the control containing the scrollbar</param> /// <param name="scrollBar">0 for horizontal, 1 for vertical</param> /// <returns>The 32-bit thumb position of the requested scrollbar</returns> internal static int ScrollThumbPosition(IntPtr handle, int scrollBar) { SCROLLINFO scrollInfo = new SCROLLINFO(); scrollInfo.fMask = 0x10; UnsafeNativeMethods.GetScrollInfo(handle, scrollBar, scrollInfo); return scrollInfo.nTrackPos; }