DrawShape example for Access 2.0

This example demonstrates most of the three-dimensional shape properties as it draws a rectangle on the current bitmap. For example purposes, both inner and outer bands are turned on. However, normal three-dimensional effects use inner bands or outer bands, but not both.

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.ShapeInnerBandHiliteColor = RGB(255, 255, 255)
Me![LEAD1].Object.ShapeInnerBandShadowColor = 0
Me![LEAD1].Object.ShapeInnerBandStyle = EFX_INNERSTYLE_RAISED
Me![LEAD1].Object.ShapeInnerBandThickness = 2

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

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

'Repaint.
Me![LEAD1].Object.ForceRepaint