Previous Document Next Document
Rectangle.CornerUpperLeft

Property CornerUpperLeft As Long

Member of Rectangle

The CornerUpperLeft property returns or sets the roundness of the upper-left corner of a rectangle.

The value for the roundness ranges from 0 (a cusp corner) to 100 (the maximum corner radius, which is half the length of the shortest side).

The following code example determines if the selected rectangle has any rounded corners:

Sub Test() 
 Dim r As Rectangle 
 If ActiveShape.Type = cdrRectangleShape Then 
  Set r = ActiveShape.Rectangle 
  If r.CornerUpperLeft = 0 And r.EqualCorners Then 
   MsgBox "The rectangle does not have rounded corners." 
  Else 
   MsgBox "The rectangle has rounded corners." 
  End If 
 Else 
  MsgBox "The selected shape is not a rectangle." 
 End If 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.