ShowBorderRemoveDlg Example for Visual Basic

    Dim RasterImgDocDlg As New LEADRasterDlgImgDoc_U
    Dim nRet As Integer

    LEAD1.Load "d:\lt15\images\ocr1.tif", 0, 1, 1
    
    RasterImgDocDlg.BorderRemove.WhiteNoiseLength = 9
    RasterImgDocDlg.BorderRemove.BorderPercent = 20
    RasterImgDocDlg.BorderRemove.Variance = 3
    RasterImgDocDlg.BorderRemove.BorderToRemove = BORDER_LEFT
    RasterImgDocDlg.BorderRemove.Flags = BORDER_USE_VARIANCE
    RasterImgDocDlg.UIFlags = BORDERREMOVE_AUTOPROCESS Or _
                              BORDERREMOVE_SHOW_PREVIEW Or _
                              BORDERREMOVE_SHOW_TOOL_ZOOMLEVEL
    
    RasterImgDocDlg.Bitmap = LEAD1.Bitmap
    RasterImgDocDlg.ShowBorderRemoveDlg (hWnd)