在一个窗体中画一个已知的BMP,怎么做啊?
我写的好象有错,大家看看:
Private objMine As New clsWinMine
Dim e As PaintEventArgs
Private Sub aaa_Renamed_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles aaa_Renamed.Click aaa(objMine, e) End Sub
Private Sub aaa(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Dim x As Single = 100.0F Dim y As Single = 100.0F Dim newImage As Image = Image.FromFile("imgMine.bmp") e.Graphics.DrawImageUnscaled(newImage, x, y) End Sub
编译错误为:
未将对象引用设置到对象的实例