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.Cre ateGraphics
Dim expansionRectan gle As New Rectangle(25, 550, 1000, 350)
Dim destRectangle1 As New Rectangle(0, 0, 1000, 350)
myGraphics.Draw Image(myBitmap, destRectangle1, expansionRectan gle,
GraphicsUnit.Pi xel)
PictureBox1.Ima ge.Save("c:\xx. tif")
myGraphics.Disp ose()
myBitmap.Dispos e()
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.Cre ateGraphics
Dim expansionRectan gle As New Rectangle(25, 550, 1000, 350)
Dim destRectangle1 As New Rectangle(0, 0, 1000, 350)
myGraphics.Draw Image(myBitmap, destRectangle1, expansionRectan gle,
GraphicsUnit.Pi xel)
PictureBox1.Ima ge.Save("c:\xx. tif")
myGraphics.Disp ose()
myBitmap.Dispos e()
myBitmap = Nothing
myGraphics = Nothing
Comment