ShadowColor example for Access 2.0

This example shows how to draw a shape with a drop shadow.

Me![LEAD1].Object.AutoRepaint = False

'Load an image for the main control
Me![LEAD1].Object.Load "c:\lead\images\image1.cmp", 0, 0, 1

'Shape background
Me![LEAD1].Object.ShapeBackgroundStyle = EFX_BACKSTYLE_TRANSPARENT

'Shape location
Me![LEAD1].Object.ShapeTop = 50
Me![LEAD1].Object.ShapeLeft = 50
Me![LEAD1].Object.ShapeWidth = Me![LEAD1].Object.DstWidth - 50
Me![LEAD1].Object.ShapeHeight = Me![LEAD1].Object.DstHeight - 50

'Shape border
Me![LEAD1].Object.ShapeBorderColor = RGB(255, 0, 0)
Me![LEAD1].Object.ShapeBorderStyle = EFX_BORDERSTYLE_SOLID
Me![LEAD1].Object.ShapeBorderThickness = 10

Me![LEAD1].Object.ShapeOuterBandHiliteColor = RGB(0, 255, 0)
Me![LEAD1].Object.ShapeOuterBandShadowColor = RGB(128, 128, 128)
Me![LEAD1].Object.ShapeOuterBandStyle = EFX_OUTERSTYLE_RAISED
Me![LEAD1].Object.ShapeOuterBandThickness = 2

'Make the shape a permanent part of the bitmap
Me![LEAD1].Object.DrawPersistence = True

Me![LEAD1].Object.PatternStyle = EFX_PATTERN_TRANSPARENT

'Shadow settings
Me![LEAD1].Object.ShadowXDepth = 10
Me![LEAD1].Object.ShadowYDepth = 10
Me![LEAD1].Object.ShadowColor = RGB(0, 0, 0)

'Draw the shape
Me![LEAD1].Object.DrawShape EFX_SHAPE_RECTANGLE, Me![LEAD2].Object.Bitmap

'Repaint
Me![LEAD1].Object.ForceRepaint