Previous Document Next Document
Shape.OrderIsInFrontOf

Function OrderIsInFrontOf(Shape As Shape) As Boolean

Member of Shape

The OrderIsInFrontOf method determines whether a shape is in front a specified shape in the stacking order.

Parameters
Description
Shape
Identifies the shape to be checked, to determine if another shape is in front of (above) it in the stacking order

The following code example fills all shapes above the selected one with red:

Sub Test() 
 Dim s As Shape, ss As Shape 
 Set s = ActiveShape 
 For Each ss In ActiveLayer.Shapes 
  If ss.OrderIsInFrontOf(s) And Not ss Is s Then 
   ss.Fill.UniformColor.RGBAssign 255, 0, 0 
  End If 
 Next ss 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.