Or you can just use the Graphics.DrawImage method. It will stretch the image for you.
Code:Dim destinationImage As New Bitmap(100, 100) Dim sourceImage As Image = PictureBox1.Image Dim g As Graphics g = Graphics.FromImage(destinationImage) g.DrawImage(sourceImage, New Rectangle(0, 0, destinationImage.Width, destinationImage.Height), 0, 0, sourceImage.Width, sourceImage.Height, GraphicsUnit.Pixel) g.Dispose() PictureBox2.Image = destinationImage




Reply With Quote