Table of contents
TOC
Collapse the table of content
Expand the table of content

ZOrder Method

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Places the object at the front or back of the z-order. Syntaxobject. ZOrder( [ zPosition ] ) The ZOrder method syntax has these parts:

PartDescription
objectRequired. A valid object.
zPositionOptional. A control's position, front or back, in the container's z-order.

Settings The settings for zPosition are:

ConstantValueDescription
fmTop0Places the control at the front of the z-order. The control appears on top of other controls (default).
fmBottom1Places the control at the back of the z-order. The control appears underneath other controls.

Remarks The z-order determines how windows and controls are stacked when they are presented to the user. Items at the back of the z-order are overlaid by closer items; items at the front of the z-order appear to be on top of items at the back. When the zPosition argument is omitted, the object is brought to the front. In design mode, the Bring to Front or Send To Back commands set the z-order. Bring to Front is equivalent to using the ZOrder method and putting the object at the front of the z-order. Send to Back is equivalent to using ZOrder and putting the object at the back of the z-order. This method does not affect content or sequence of the controls in the Controls collection.

Note You can't Undo or Redo layering commands, such as Send to Back or Bring to Front. For example, if you select an object and click Move Backward on the shortcut menu, you won't be able to Undo or Redo that action.

© 2018 Microsoft