ShowAddBorderDlg Example for Visual Basic
Dim RasterImgDlg As New LEADRasterDlgImg
Dim RasterProc As New LEADRasterProcess
Dim RasterIO As New LEADRasterIO
Dim nRet As Integer
Dim i As Integer
Private Sub AddBorder_Click()
Dim SelectedRaster As New LEADRaster
RasterImgDlg.ItemsCount = 3
RasterImgDlg.ItemFileName(0) = "c:\Image1.bmp"
RasterImgDlg.ItemFileName(1) = "c:\Image2.cmp"
RasterImgDlg.ItemFileName(2) = "c:\ Image3.jpg"
For i = 0 To RasterImgDlg.ItemsCount - 1
RasterImgDlg.ItemDescription(i) = RasterImgDlg.ItemFileName(i)
RasterIO.Load LEADRasterView1.Raster, RasterImgDlg.ItemFileName(i), 0, 0, 1
RasterImgDlg.ItemBitmap(i) = LEADRasterView1.Raster.Bitmap
Next i
RasterImgDlg.UIFlags = ADDBORDER_SHOW_PREVIEW Or _
ADDBORDER_SHOW_TOOL_ZOOMLEVEL Or _
ADDBORDER_SHOW_TOOL_SHOWEFFECT Or _
ADDBORDER_SHOW_TOOL_ONSCREEN Or _
ADDBORDER_SHOW_TOOL_RESET
RasterImgDlg.Bitmap = LEADRasterView1.Raster.Bitmap
nRet = RasterImgDlg.ShowAddBorderDlg(hWnd)
SelectedRaster.Bitmap = RasterImgDlg.SelectedBitmap
If (nRet = 0 And RasterImgDlg.DialogStatus = DLG_OK) Then
RasterProc.AddBorder LEADRasterView1.Raster, _
RasterImgDlg.LeftThickness, _
RasterImgDlg.TopThickness, _
RasterImgDlg.RightThickness, _
RasterImgDlg.BottomThickness, _
RasterImgDlg.Location, _
RasterImgDlg.BorderStyle, _
RasterImgDlg.EffectStyle, _
SelectedRaster, _
RasterImgDlg.GradientStyle, _
RasterImgDlg.GradientStartColor, _
RasterImgDlg.GradientEndColor, _
RasterImgDlg.CurveIntensity, _
RasterImgDlg.EnableSoftCurve, _
RasterImgDlg.EnableShadow, _
RasterImgDlg.ShadowSize, _
RasterImgDlg.ShadowDirection, _
RasterImgDlg.EnableBumpyShadow
End If
End Sub