ShowSmoothDlg Example for Visual Basic

Dim RasterImgDocDlg As New LEADRasterDlgImgDoc
Dim RasterProc   As New LEADRasterProcess
Dim nRet As Integer
Private Sub Smooth_Click()
   RasterImgDocDlg.Smooth.Flags= SMOOTH_ALLFLAGS
   RasterImgDocDlg.Smooth.Length = 1
   RasterImgDocDlg.WhiteAreaColor = RGB(255, 0, 0) 
   RasterImgDocDlg.BlackAreaColor = RGB(0, 0, 255) 
   RasterImgDocDlg.UIFlags = SMOOTH_SHOW_PREVIEW Or _
                             SMOOTH_SHOW_TOOL_ZOOMLEVEL

   RasterImgDocDlg.Bitmap = LEADRasterView1.Raster.Bitmap
   nRet = RasterImgDocDlg.ShowSmoothDlg(hWnd) 
   If (nRet = 0 And RasterImgDocDlg.DialogStatus = DLG_OK) Then
      RasterProc.Smooth LEADRasterView1.Raster, _
                        RasterImgDocDlg.Smooth.Length, _
                        RasterImgDocDlg.Smooth.Flags
   LEADRasterView1.ForceRepaint
   End If
  End Sub