ShowPixelateDlg Example for Visual Basic

Dim RasterImgEfxDlg As New LEADRasterDlgImgEfx
Dim RasterProc   As New LEADRasterProcess
Dim nRet As Integer
Private Sub Pixelate_Click()
   RasterImgEfxDlg.UIFlags = PIXELATE_SHOW_PREVIEW Or _
                                PIXELATE_SHOW_TOOL_ZOOMLEVEL

   RasterImgEfxDlg.Bitmap = LEADRasterView1.Raster.Bitmap
   nRet = RasterImgEfxDlg.ShowPixelateDlg(hWnd) 
   If (nRet = 0 And RasterImgEfxDlg.DialogStatus = DLG_OK) Then
      RasterProc.Pixelate LEADRasterView1.Raster, RasterImgEfxDlg.CellWidth, _
                            RasterImgEfxDlg.CellHeight, _
                            RasterImgEfxDlg.Opacity, _
                            RasterImgEfxDlg.CenterX, _
                            RasterImgEfxDlg.CenterY, _
                            RasterImgEfxDlg.ImageEffectFlags
   End If
End Sub