ShowCanvasResizeDlg Example for Visual Basic

Dim RasterImgDlg   As New LEADRasterDlgImg
Dim nRet As Integer

Private Sub CanvasResize_Click()

   RasterImgDlg.CurrentWidth = LEADRasterView1.Raster.BitmapWidth
   RasterImgDlg.CurrentHeight = LEADRasterView1.Raster.BitmapHeight
   RasterImgDlg.BackColor = RGB(255, 255, 255) 
   RasterImgDlg.UIFlags = CANVASRESIZE_SHOW_CURRENT_HEIGHT Or _
                            CANVASRESIZE_SHOW_CURRENT_WIDTH Or _
                            CANVASRESIZE_SHOW_HORIZPOS Or _
                            CANVASRESIZE_SHOW_VIRTZPOS Or _
                            CANVASRESIZE_SHOW_BACKCOLOR Or _
                            CANVASRESIZE_SHOW_KEEPASPECT Or _
                            CANVASRESIZE_AUTOPROCESS
                               
   RasterImgDlg.Bitmap = LEADRasterView1.Raster.Bitmap
   nRet = RasterImgDlg.ShowCanvasResizeDlg (hWnd) 
End Sub