Hi,
I am a Newbie to Basic4PPC so sorry if this is a dumb question!!
I have modified the BigImage program I found elsewhere on the forum to add some more functionality. I hav added zooming to it and wanted to add a readout of mouse position over the image. However I have been unable to make this work. I have followed all the examples I can find on the forum and elsewhere but get an error:
"Object Reference not set to an instance of an object."
The relevant code is:
Sub App_Start
......
img1obj.New1(False)
img1obj.FromControl("Image1")
img1mve.New1(img1obj.Value,"MouseMove")
.......
Sub img1mve_NewEvent
x = img1obj.GetProperty("X") '<error here!
y = img1obj.GetProperty("Y")
label1.Text = x
label2.Text = y
End Sub
Can anyone help get me on the right track?
David.
I am a Newbie to Basic4PPC so sorry if this is a dumb question!!
I have modified the BigImage program I found elsewhere on the forum to add some more functionality. I hav added zooming to it and wanted to add a readout of mouse position over the image. However I have been unable to make this work. I have followed all the examples I can find on the forum and elsewhere but get an error:
"Object Reference not set to an instance of an object."
The relevant code is:
Sub App_Start
......
img1obj.New1(False)
img1obj.FromControl("Image1")
img1mve.New1(img1obj.Value,"MouseMove")
.......
Sub img1mve_NewEvent
x = img1obj.GetProperty("X") '<error here!
y = img1obj.GetProperty("Y")
label1.Text = x
label2.Text = y
End Sub
Can anyone help get me on the right track?
David.