ShowAddFrameDlg 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
        LEAD2.Load RasterImgDlg.ItemFileName(0), 0, 0, 1
        RasterImgDlg.ItemDescription(i) = RasterImgDlg.ItemFileName(i)
        RasterImgDlg.ItemBitmap(i) = LEAD2.Bitmap
    Next i

    RasterImgDlg.SelectedBitmapIndex = 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 = LEAD1.Bitmap
    nRet = RasterImgDlg.ShowAddBorderDlg(hWnd)
    If (nRet = 0 And RasterImgDlg.DialogStatus = DLG_OK) Then
        LEAD2.Bitmap = RasterImgDlg.SelectedBitmap
        LEAD1.AddFrame LEAD2.Bitmap, _
                       RasterImgDlg.EnableKeepFrameState, _
                       RasterImgDlg.EnableUseMask, _
                       RasterImgDlg.MaskColor, _
                       RasterImgDlg.SmoothEdge, _
                       RasterImgDlg.Location, _
                       RasterImgDlg.Quality
    End If