ShowHalftoneDlg Example for Visual Basic

    Dim RasterColorDlg As New LEADRasterDlgClr_U
    Dim nRet As Integer
    Dim i As Integer

    RasterColorDlg.ItemsCount = 3
    RasterColorDlg.ItemFileName(0) = "d:\temp\1.jpg"
    RasterColorDlg.ItemFileName(1) = "d:\temp\2.jpg"
    RasterColorDlg.ItemFileName(2) = "d:\temp\3.jpg"

    For i = 0 To RasterColorDlg.ItemsCount - 1
        LEAD2.Load RasterColorDlg.ItemFileName(i), 0, 0, 1
        RasterColorDlg.ItemDescription(i) = RasterColorDlg.ItemFileName(i)
        RasterColorDlg.ItemBitmap(i) = LEAD2.Bitmap
    Next i
    RasterColorDlg.Angle = 5
    RasterColorDlg.Dimension = 5
    RasterColorDlg.HalftoneType = HT_RECT

    RasterColorDlg.UIFlags = HALFTONE_SHOW_PREVIEW Or _
                             HALFTONE_SHOW_TOOL_ZOOMLEVEL Or _
                             HALFTONE_SHOW_TOOL_SHOWEFFECT Or _
                             HALFTONE_SHOW_TOOL_ONSCREEN Or _
                             HALFTONE_SHOW_TOOL_RESET

    RasterColorDlg.Bitmap = LEAD1.Bitmap
    nRet = RasterColorDlg.ShowHalftoneDlg(hWnd)
    If (nRet = 0 And RasterColorDlg.DialogStatus = DLG_OK) Then
        MsgBox "No of Selected Items are " + Str(RasterColorDlg.SelectedBitmapsCount)
        If (RasterColorDlg.SelectedBitmapList <> 0) Then
            LEAD1.BitmapList = RasterColorDlg.SelectedBitmapList
        End If
    End If