Available in the LEADTOOLS Imaging toolkit. |
ShowAddBorderDlg Example for Visual Basic
Dim nRet As Integer Dim i As Integer RasterImgDlg.ItemsCount = 3 RasterImgDlg.ItemFileName(0) = "d:\temp\1.jpg" RasterImgDlg.ItemFileName(1) = "d:\temp\2.jpg" RasterImgDlg.ItemFileName(2) = "d:\temp\3.jpg" For i = 0 To RasterImgDlg.ItemsCount - 1 RasterImgDlg.ItemDescription(i) = RasterImgDlg.ItemFileName(i) LEAD2.Load RasterImgDlg.ItemFileName(i), 0, 1, 1 RasterImgDlg.ItemBitmap(i) = LEAD2.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 = LEAD1.Bitmap nRet = RasterImgDlg.ShowAddBorderDlg(hWnd) LEAD2.Bitmap = RasterImgDlg.SelectedBitmap If (nRet = 0 And RasterImgDlg.DialogStatus = DLG_OK) Then LEAD1.AddBorder RasterImgDlg.LeftThickness, _ RasterImgDlg.TopThickness, _ RasterImgDlg.RightThickness, _ RasterImgDlg.BottomThickness, _ RasterImgDlg.Location, _ RasterImgDlg.BorderStyle, _ RasterImgDlg.EffectStyle, _ LEAD2.Bitmap, _ RasterImgDlg.GradientStyle, _ RasterImgDlg.GradientStartColor, _ RasterImgDlg.GradientEndColor, _ RasterImgDlg.CurveIntensity, _ RasterImgDlg.EnableSoftCurve, _ RasterImgDlg.EnableShadow, _ RasterImgDlg.ShadowSize, _ RasterImgDlg.ShadowDirection, _ RasterImgDlg.EnableBumpyShadow End If