Previous Document Next Document
EffectDropShadow.Opacity

Property Opacity As Long

Member of EffectDropShadow

The Opacity property returns or sets the opacity value of a drop shadow. Values range from 0% to 100%. Low values create a less opaque drop shadow, while high values create a more opaque drop shadow.

The following code example sets the opacity of the selected drop shadow to 80%:

Sub Test() 
 Dim eff As Effect 
 Dim bDone As Boolean 
 If ActiveShape Is Nothing Then 
  MsgBox "Nothing selected", vbCritical 
  Exit Sub 
 End If 
 bDone = False 
 If ActiveShape.Next.Type = cdrDropShadowGroupShape Then 
  Set eff = ActiveShape.Next.Effect 
  eff.DropShadow.Opacity = 80 
  bDone = True 
 End If 
 If Not bDone Then 
  MsgBox "The selected shape doesn't have a dropshadow", vbCritical 
 End If 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.