ShowPosterizeDlg Example for Visual Basic

    Dim RasterColorDlg As New LEADRasterDlgClr_U
    Dim nRet As Integer
    
    RasterColorDlg.Levels = 2
    RasterColorDlg.UIFlags = POSTERIZE_SHOW_PREVIEW Or _
                             POSTERIZE_SHOW_TOOL_ZOOMLEVEL
    RasterColorDlg.Bitmap = LEAD1.Bitmap
    nRet = RasterColorDlg.ShowPosterizeDlg(hWnd)
    If (nRet = 0 And RasterColorDlg.DialogStatus = DLG_OK) Then
        LEAD1.Posterize RasterColorDlg.Levels
    End If