我有一个简单的表单,我想从磁盘上绘制一个Icon文件。
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim g As Graphics = Me.CreateGraphics()
'Dim theIcon As Icon = LoadIconFromFile("c:\Users\blabla\pmt.ico")
Dim theIcon As Icon = New Icon("c:\Users\blabla\pmt.ico",New Size(64, 64))
g.DrawIcon(theIcon, 20, 20)
g.Dispose()
theIcon.Dispose()
End Sub
但是表单上没有任何图像。 你知道我做错了什么吗? 谢谢!