ShowEffectDlg Example for Visual Basic

    Dim RasterEfxDlg As New LEADRasterDlgEfx_U
   Dim nRet As Integer
   
   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 = LEAD1.Bitmap
   nRet = RasterEfxDlg.ShowEffectDlg(hWnd)
   If (nRet = 0 And RasterEfxDlg.DialogStatus = DLG_OK) Then
      LEAD1.AutoRepaint = False
      LEAD1.BackErase = True
      LEAD1.EffectGrain = RasterEfxDlg.Effect.Grain
      LEAD1.EffectDelay = RasterEfxDlg.Effect.Delay
      LEAD1.WandSize = RasterEfxDlg.Effect.WandThickness
      LEAD1.WandColor = RasterEfxDlg.Effect.WandColor     'Yellow Wand
      LEAD1.PaintEffect = RasterEfxDlg.Effect.EffectStyle
      LEAD1.ForceRepaint
   End If