I'm trying to display a rectangle in a picture box and then rotate it. Using the information I found at http://www.informit.com/articles/art...29477&seqNum=9 I managed to display a rectangle in a picture box, but, I can't get it to rotate. So, how do I rotate an image in VB.NET?
VB Code:
Dim myGraphics As Graphics, myPen As Pen myPen = New Pen(Color.Red) myGraphics = Graphics.FromHwnd(PictureBox1.Handle) myGraphics.DrawRectangle(myPen, 100, 100, 200, 200) myGraphics.TranslateTransform(100, 100) myGraphics.RotateTransform(45)




Reply With Quote