ShowHalftoneDlg Example for Visual Basic
Dim RasterColorDlg As New LEADRasterDlgClr
Dim RasterIO As New LEADRasterIO
Dim nRet As Integer
Dim i As Integer
Private Sub Halftone_Click()
Dim Raster As New LEADRaster
RasterColorDlg.ItemsCount = 3
RasterColorDlg.ItemFileName (0) = "c:\1.bmp" 'e:\image1.jpg'"
RasterColorDlg.ItemFileName(1) = "c:\1.cmp" 'e:\image2.jpg'"
RasterColorDlg.ItemFileName(2) = "c:\1.jpg" 'e:\image3.jpg'"
For i = 0 To RasterColorDlg.ItemsCount - 1
RasterIO.Load Raster, RasterColorDlg.ItemFileName(i), 0, 0, 1
RasterColorDlg.ItemDescription (i) = RasterColorDlg.ItemFileName(i)
RasterColorDlg.ItemBitmap (i) = Raster.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 = LEADRasterView1.Raster.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
LEADRasterView1.Raster.BitmapList = RasterColorDlg.SelectedBitmapList
End If
End If
End Sub