ShowAutoTrimDlg Example for Visual Basic

    Dim RasterImgDlg As New LEADRasterDlgImg_U
    Dim nRet As Integer

    RasterImgDlg.UIFlags = AUTOTRIM_SHOW_PREVIEW
    RasterImgDlg.Bitmap = LEAD1.Bitmap
    nRet = RasterImgDlg.ShowAutoTrimDlg(hWnd)
    If (nRet = 0 And RasterImgDlg.DialogStatus = DLG_OK) Then
        LEAD1.AutoTrim RasterImgDlg.Threshold
    End If