VB.NET GDI+如何在窗体上绘制PNG图像?
RT,VB.NET GDI+如何在窗体上绘制PNG图像?
求指点完整代码
假设路径为:"c:\1.png"
如何绘制到FORM1上?
[解决办法]
Protected Overrides Sub OnPaint(e As PaintEventArgs)
MyBase.OnPaint(e)
Dim g As Graphics = e.Graphics
g.SmoothingMode = SmoothingMode.HighQuality
g.PixelOffsetMode = PixelOffsetMode.HighQuality
Dim bmp As New Bitmap(imageFilePath)
g.DrawImage(bmp, Left, Top, Width, Height)
End Sub