標題: VB6 Picture如何旋轉到指定角度 [打印本頁] 作者: StarWU 時間: 2017-7-21 23:06 標題: VB6 Picture如何旋轉到指定角度 我查到有個範例可以旋轉90 180 270度,如下。 但我想學任意角度的旋轉方法。有高手可提供範例嗎?
Dim Img As System.Drawing.Image
Img = System.Drawing.Image.FromFile("C:\Users\Star\Pictures\Blue hills.jpg")
Dim TargetImg As New System.Drawing.Bitmap(800, 600)
Dim g As Graphics = Graphics.FromImage(TargetImg)
Img.RotateFlip(System.Drawing.RotateFlipType.RotateNoneFlipNone)
g.DrawImage(Img, New Point(0, 0))
PictureBox1.Image = TargetImg