API Documentation > CorelDRAW > 2025-v26 > EffectDropShadow > IVGEffectDropShadow
EffectDropShadow.OffsetX property
Gets or sets the X offset for the dropshadow
Syntax:
Property Get OffsetX() As Double
Property Let OffsetX(ByVal Value As Double)
Remarks:
The OffsetX property returns or specifies the horizontal offset of a flat drop shadow. See also the EffectDropShadow.SetOffset method.
Examples:
The following VBA example moves all flat drop shadows - so that the offset distance is 0.5" - while preserving the original offset angle.
Sub Test()
Const Radius As Double = 0.5
Dim s As Shape, ds As EffectDropShadow
Dim dx As Double, dy As Double, r As Double
For Each s In ActivePage.Shapes
  If s.Type = cdrDropShadowGroupShape Then

 Set ds = s.Effect.DropShadow

 If ds.Type = cdrDropShadowFlat Then


dx = ds.OffsetX


dy = ds.OffsetY


r = Sqr(dx * dx + dy * dy)


If r = 0 Then


  dx = 1


  r = 1


End If


ds.OffsetX = dx * Radius / r


ds.OffsetY = dy * Radius / r

 End If
  End If
Next s 
End Sub