J
Joe
does anyone know why this source code throws an error??
Dim myBitmap As System.Drawing.Bitmap
Dim myGraphics As Graphics
myBitmap = New System.Drawing.Bitmap(fileName:="C:\test.tif")
myGraphics = PictureBox1.CreateGraphics
Dim expansionRectangle As New Rectangle(25, 550, 1000, 350)
Dim destRectangle1 As New Rectangle(0, 0, 1000, 350)
myGraphics.DrawImage(myBitmap, destRectangle1, expansionRectangle,
GraphicsUnit.Pixel)
PictureBox1.Image.Save("c:\xx.tif")
myGraphics.Dispose()
myBitmap.Dispose()
myBitmap = Nothing
myGraphics = Nothing
Dim myBitmap As System.Drawing.Bitmap
Dim myGraphics As Graphics
myBitmap = New System.Drawing.Bitmap(fileName:="C:\test.tif")
myGraphics = PictureBox1.CreateGraphics
Dim expansionRectangle As New Rectangle(25, 550, 1000, 350)
Dim destRectangle1 As New Rectangle(0, 0, 1000, 350)
myGraphics.DrawImage(myBitmap, destRectangle1, expansionRectangle,
GraphicsUnit.Pixel)
PictureBox1.Image.Save("c:\xx.tif")
myGraphics.Dispose()
myBitmap.Dispose()
myBitmap = Nothing
myGraphics = Nothing