ScreenUpdating property

Microsoft Visio Developer Reference

ScreenUpdating property

       

Determines whether the screen is updated (redrawn) during a series of actions.

Version added

3.0

Syntax

intRet = object.ScreenUpdating
object.ScreenUpdating = intExpression

intRet

Integer. Zero (0) if screen updating is off; -1 if screen updating is on.

object

Required. An expression that returns an Application object.

intExpression

Required Integer. Zero (0) to turn screen updating off; non-zero to turn screen updating on.

Remarks

Use the ScreenUpdating property to increase performance during a series of actions. For example, you can turn off screen updating while a series of shapes are created so the screen is not redrawn after each shape appears, and then turn screen updating on to update the screen.

If you send a large number of commands to a Visio instance while screen updating is turned off, the Visio instance may redisplay the screen occasionally in order to flush its buffers.

If a program neglects to turn screen updating on after turning it off, the Visio instance turns screen updating back on when a user performs an operation.

Note Beginning with Visio 2000, the ShowChanges property is included. The ShowChanges and ScreenUpdating properties are similar in that they are both designed to increase performance during a series of actions, but they work differently. Setting the ShowChanges property also sets the ScreenUpdating property, but setting the ScreenUpdating property does not set the ShowChanges property. For information comparing these two properties, see the ShowChanges property.