Control.Refresh Method


强制控件使其工作区无效并立即重绘自己和任何子控件。Forces the control to invalidate its client area and immediately redraw itself and any child controls.

 virtual void Refresh();
public virtual void Refresh ();
abstract member Refresh : unit -> unit
override this.Refresh : unit -> unit
Public Overridable Sub Refresh ()

Notes to Inheritors

当在派生类中重写 Refresh() 时,请确保调用基类的 Refresh() 方法,以便使控件及其子控件无效并重新绘制。When overriding Refresh() in a derived class, be sure to call the base class's Refresh() method so the control and its child controls are invalidated and redrawn.

Applies to

See also