System.Windows.Forms.Control.Refresh C# (CSharp) Method

Refresh() public method

public Refresh ( ) : void
return void
		public virtual void Refresh() {
			if (IsHandleCreated && Visible) {
				Invalidate(true);
				Update ();
			}
		}

Usage Example

Example #1
0
        public static void ResumeDrawing(Control c)
        {
            try
            {
                //re-enable drawing
                if (c is TabPage)
                {
                    SendMessage(c.Parent.Handle, WM_SETREDRAW, 1, IntPtr.Zero);
                    //c.Refresh(); // <-- actually redraw
                    c.Parent.Refresh();
                }
                else
                {
                    SendMessage(c.Handle, WM_SETREDRAW, 1, IntPtr.Zero);

                    c.Refresh(); // <-- actually redraw
                }
                suspend = false;
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
                return;
            }
        }
All Usage Examples Of System.Windows.Forms.Control::Refresh
Control