ShowAddFrameDlg Example for Visual Basic
Dim RasterImgDlg As New LEADRasterDlgImg
Dim RasterProc As New LEADRasterProcess
Dim Raster As New LEADRaster
Dim RasterIO As New LEADRasterIO
Dim nRet As Integer
Dim i As Integer
Dim SelectedRaster As New LEADRaster
RasterImgDlg.ItemsCount = 3
RasterImgDlg.ItemFileName (0) = "e:\1.bmp"
RasterImgDlg.ItemFileName(1) = "e:\2.bmp"
RasterImgDlg.ItemFileName(2) = "e:\3.bmp"
For i = 0 To RasterImgDlg.ItemsCount - 1
RasterIO.Load Raster, RasterImgDlg.ItemFileName(0), 0, 0, 1
RasterImgDlg.ItemDescription (i) = RasterImgDlg.ItemFileName(i)
RasterImgDlg.ItemBitmap (i) = Raster.Bitmap
Next i
RasterImgDlg.SelectedBitmap Index = 0
RasterImgDlg.UIFlags = ADDFRAME_SHOW_PREVIEW Or _
ADDFRAME_SHOW_TOOL_ZOOMLEVEL Or _
ADDFRAME_SHOW_TOOL_SHOWEFFECT Or _
ADDFRAME_SHOW_TOOL_ONSCREEN Or _
ADDFRAME_SHOW_TOOL_RESET
RasterImgDlg.Bitmap = LEADRasterView1.Raster.Bitmap
nRet = RasterImgDlg.ShowAddBorderDlg (hWnd)
If (nRet = 0 And RasterImgDlg.DialogStatus = DLG_OK) Then
SelectedRaster.Bitmap = RasterImgDlg.SelectedBitmap
RasterProc.AddFrame LEADRasterView1.Raster, _
SelectedRaster, _
RasterImgDlg.EnableKeepFrameState, _
RasterImgDlg.EnableUseMask, _
RasterImgDlg.MaskColor, _
RasterImgDlg.SmoothEdge, _
RasterImgDlg.Location, _
RasterImgDlg.Quality
End If
End Sub