Refresh Method

Purpose

Forces a complete repaint of a form or control.

Syntax

Object.Refresh

Object:Ocx Object

Description

Generally, painting a form or control is handled automatically while no events are occurring. However, there may be situations where you want the form or control updated immediately.

Refresh invokes the UpdateWindow API function to send the object a WM_PAINT message if the window's update region is not empty. The function sends a WM_PAINT message directly to the window procedure of the specified window, bypassing the application queue. If the update region is empty, no message is sent.

Example

OpenW 1

Box 10, 10, 100, 100

Win_1.Refresh

Remarks

See Also

Form

{Created by Sjouke Hamstra; Last updated: 22/10/2014 by James Gaite}