private SCROLLINFO GetScrollInfo(ScrollBarType Type, ScrollInfoMask Mask) { SCROLLINFO ScrollInfo = new SCROLLINFO(); ScrollInfo.cbSize = Marshal.SizeOf(VerticalScroll); ScrollInfo.fMask = Mask; GetScrollInfo(Handle, ScrollBarType.SB_VERT, ScrollInfo); return(ScrollInfo); }
//Information about the scroll bar. private SCROLLINFO GetScrollInfo(SBOrientation orientation, ScrollInfoMask mask) { SCROLLINFO si = new SCROLLINFO(); si.cbSize = (uint)Marshal.SizeOf <SCROLLINFO>(si); si.fMask = mask; GetScrollInfo(this.Handle, orientation, ref si); return(si); }
/// <summary> /// Create a ScrollInfo struct with the specified mask /// </summary> /// <param name="mask">ScrollInfoMask</param> public static ScrollInfo Create(ScrollInfoMask mask) { return(new ScrollInfo { _cbSize = (uint)Marshal.SizeOf(typeof(ScrollInfo)), _fMask = mask, _nMin = 0, _nMax = 0, _nPage = 0, _nPos = 0, _nTrackPos = 0 }); }
private SCROLLINFO GetScrollInfo(ScrollBarType Type, ScrollInfoMask Mask) { SCROLLINFO ScrollInfo = new SCROLLINFO(); ScrollInfo.cbSize = Marshal.SizeOf(VerticalScroll); ScrollInfo.fMask = Mask; GetScrollInfo(Handle, ScrollBarType.SB_VERT, ScrollInfo); return ScrollInfo; }