VB.NET picturebox 内绘图完图形放大缩小移动 鼠标控制 。比较笨看了VB的代码不明白 求解

。net 不用api就行

缩放操作

Function 缩放(ByVal bitmap As Bitmap, ByVal 倍数 As Single) As Bitmap

Dim w As Integer = bitmap.Width * 倍数

Dim h As Integer = bitmap.Height * 倍数

Dim tem As New Bitmap(w, h)

Dim g As Graphics = Graphics.FromImage(tem)

g.DrawImage(bitmap, New Rectangle(0, 0, w, h), New Rectangle(0, 0, bitmap.Width, bitmap.Height), GraphicsUnit.Pixel)

g.Dispose()

Return tem

End Function

鼠标滚轮事件 MouseWheel

MouseEventArgs.Delta 值可以判断滚动方向