public void ResumeDrawing() { ctrl.VerticalScroll.Value = Math.Min(ctrl.VerticalScroll.Maximum, scrollValue); ctrl.ResumeLayout(); SendMessage(ctrl.Handle, WM_SETREDRAW, true, 0); ctrl.Refresh(); }
/// <summary> /// Sets the automatic scroll position. /// </summary> /// <param name="control">The control.</param> /// <param name="value">The value.</param> public static void SetAutoScrollPosition(this ScrollableControl control, Point value) { if (control.InvokeRequired) { control.BeginInvoke(new MethodInvoker(() => control.SetAutoScrollPosition(value))); } else { control.AutoScrollPosition = value; control.Refresh(); } }
/// <summary> /// Sets the minimum size of the automatic scroll. /// </summary> /// <param name="control">The control.</param> /// <param name="value">The value.</param> public static void SetAutoScrollMinSize(this ScrollableControl control, Size value) { if (control.InvokeRequired) { control.BeginInvoke(new MethodInvoker(() => control.SetAutoScrollMinSize(value))); } else { control.AutoScrollMinSize = value; control.Refresh(); } }
public static void RefreshControl(Control c) { ScrollableControl sc = c as ScrollableControl; if (sc != null) { sc.Refresh(); } else { if (c != null) { c.Refresh(); } } }
public static void ResumeDrawing(this ScrollableControl parent) { SendMessage(parent.Handle, WM_SETREDRAW, true, 0); parent.Refresh(); }