Visio’s How do the background shapes work?

When dropped on the current page the background shapes automatically adjust to the size of the current page. This is more obvious when the page has a landscape orientation.  This same feature is also used in the border shapes.

To make your own background shape, create a shape that has no problems being stretched and then set the Width and Height cell in the Shape transform section. The new formulas should be Width =GUARD(ThePage!PageWidth) and Height =GUARD(ThePage!PageHeight). The Guard will prevent the formula from being changed.

If you do not play with the background you may not need to set the protection cells, but the background shapes do set LockWidth, LockHeight, LockMoveX, LockMoveY, LockRotate and LockTextEdit to 1 in the Protection section.

What may not be obvious when using the background shape is that the shape is not placed on the current foreground page, but on a new background page, called VBackground, that is attached to the page. If you drop more background shapes, the current background shape on VBackground is replaced. The shape accomplishes this by running an add-on called “Make Background” when the shape is dropped. In the Events section set the EventDrop cell to RUNADDON(“Make Background”)+SETF(“EventDrop”,0). The last bit, “+SETF(…)”, clears the content of the EventDrop Cell once the shape is dropped.

John Marshall… Visio MVP       Visio.MVPs.org

Published by johnvisiomvp

The original Visio MVP. I have worked with the Visio team since 1993

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s