Shape.Update Method

Causes the control to redraw the invalidated regions within its client area.

Namespace:  Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

'Declaration
Public Sub Update
public void Update()
public:
void Update()
member Update : unit -> unit
public function Update()

Remarks

The Update method executes any pending requests for painting.

There are two ways to repaint a form and its contents:

  • You can use the Invalidate method with the Update method.

  • You can call the Refresh method, which forces the control to redraw itself and all its children. This is equivalent to setting the Invalidate method to true and using it with Update.

The Invalidate method governs what is painted or repainted. The Update method governs when the painting or repainting occurs. The Update method just forces the control to be painted immediately, but the Invalidate method governs what is painted when you call the Update method.

.NET Framework Security

See Also

Reference

Shape Class

Microsoft.VisualBasic.PowerPacks Namespace

Other Resources

How to: Draw Lines with the LineShape Control (Visual Studio)

How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)

Introduction to the Line and Shape Controls (Visual Studio)