I'm a begginer using VB.Net framework 4.7.2 Winforms. Im trying to rotate an image of a plane in my application , but it shows the rotated one and the original.
left picture is not rotated and the right is rotated at -25°
Private Sub Rotation(sender As Object, e As PaintEventArgs) Handles PictureBox1.Paint
With e.Graphics
.TranslateTransform(PictureBox1.Width \ 2, PictureBox1.Height \ 2)
.RotateTransform(dgr)
.DrawImage(PictureBox1.Image, (-PictureBox1.Width \ 2), (-PictureBox1.Height \ 2))
End With
End Sub
This is the code I rotate the image with
I want just the rotated image shown. Thanks in advance.