90 180 270 360可以使用 PaintPicture 一行代码搞定 百度一下PaintPicture'
其它角度可以调用下面这段副程序
Private Sub DanRotate(ByRef picDestHdc As Long, xPos As Long, yPos As Long, ByVal Angle As Long, ByRef picSrcHdc As Long, srcXoffset As Long, srcYoffset As Long, ByVal srcWidth As Long, ByVal srcHeight As Long)
Dim Points(3) As POINTS2D
Dim DefPoints(3) As POINTS2D
Dim ThetS As Single, ThetC As Single
Dim Ret As Long
Points(0).X = -srcWidth * 0.5
Points(0).Y = -srcHeight * 0.5
Points(1).X = Points(0).X + srcWidth
Points(1).Y = Points(0).Y
Points(2).X = Points(0).X
Points(2).Y = Points(0).Y + srcHeight
ThetS = Sin(Angle * NotPI)
ThetC = Cos(Angle * NotPI)
DefPoints(0).X = (Points(0).X * ThetC - Points(0).Y * ThetS) + xPos
DefPoints(0).Y = (Points(0).X * ThetS + Points(0).Y * ThetC) + yPos
DefPoints(1).X = (Points(1).X * ThetC - Points(1).Y * ThetS) + xPos
DefPoints(1).Y = (Points(1).X * ThetS + Points(1).Y * ThetC) + yPos
DefPoints(2).X = (Points(2).X * ThetC - Points(2).Y * ThetS) + xPos
DefPoints(2).Y = (Points(2).X * ThetS + Points(2).Y * ThetC) + yPos
PlgBlt picDestHdc, DefPoints(0), picSrcHdc, srcXoffset, srcYoffset, srcWidth, srcHeight, 0, 0, 0
End Sub
