ShowEffectDlg Example for Visual Basic
Dim RasterEfxDlg As New LEADRasterDlgEfx
Dim nRet As Integer
Private Sub Effect_Click()
RasterEfxDlg.Effect.EffectStyle = EFX_EFFECT_BLIND_CLASS
RasterEfxDlg.Effect.Grain = 5
RasterEfxDlg.Effect.Delay = 50
RasterEfxDlg.Effect.MaxPass = 1
RasterEfxDlg.Effect.Transparent = False
RasterEfxDlg.Effect.TransparentColor = RGB(0, 0, 0)
RasterEfxDlg.Effect.WandThickness = 3
RasterEfxDlg.Effect.WandColor = RGB(255, 0, 0)
RasterEfxDlg.UIFlags = EFFECT_SHOW_PREVIEW Or _
EFFECT_DELAY Or _
EFFECT_GRAIN Or _
EFFECT_PASSES Or _
EFFECT_TRANSPARENT Or _
EFFECT_WAND Or _
EFFECT_CLASS_WIPE Or _
EFFECT_CLASS_WIPERECT Or _
EFFECT_CLASS_WIPECIRCLE Or _
EFFECT_CLASS_PUSH Or _
EFFECT_CLASS_SLIDE Or _
EFFECT_CLASS_ROLL Or _
EFFECT_CLASS_ROTATE Or _
EFFECT_CLASS_ZOOM Or _
EFFECT_CLASS_DRIP Or _
EFFECT_CLASS_BLIND Or _
EFFECT_CLASS_RANDOM Or _
EFFECT_CLASS_CHECK Or _
EFFECT_CLASS_BLOCKS Or _
EFFECT_CLASS_CIRCLE Or _
EFFECT_CLASS_ELLIPSE
RasterEfxDlg.Bitmap = LEADRasterView1.Raster.Bitmap
nRet = RasterEfxDlg.ShowEffectDlg (hWnd)
If (nRet = 0 And RasterEfxDlg.DialogStatus = DLG_OK) Then
LEADRasterView1.AutoRepaint = False
LEADRasterView1.BackErase = True
LEADRasterView1.EffectGrain = RasterEfxDlg.Effect.Grain
LEADRasterView1.EffectDelay = RasterEfxDlg.Effect.Delay
LEADRasterView1.WandSize = RasterEfxDlg.Effect.WandThickness
LEADRasterView1.WandColor = RasterEfxDlg.Effect.WandColor 'Yellow Wand
LEADRasterView1.PaintEffect = RasterEfxDlg.Effect.EffectStyle
LEADRasterView1.ForceRepaint
End If
End Sub