Hi,
I need to add some events to an Native image. I use the following code:
NImage1.New1("TextPhoto",20,90,200,200)
NImage1.Color=BackColor
doorobj.New1(False)
*** doorobj.FromControl("NImage1")
eventobj1.New1(doorobj.value,"MouseDown")
eventobj2.New1(doorobj.value,"MouseMove")
eventobj3.New1(doorobj.value,"MouseUp")
NImage1 is a NativeImage
doorobj is an object from the door library
eventobj1, 2 and 3 are events from the door library
On the marked line I get the following error message:
On the PC
"An object of type DBasic.Other.SWrapObject can not be converted to type System.Windows.Forms.Control." (Translated from dutch)
On the device:
Invalid cast exception
Am I doing somethging wrong?
Harry
I need to add some events to an Native image. I use the following code:
NImage1.New1("TextPhoto",20,90,200,200)
NImage1.Color=BackColor
doorobj.New1(False)
*** doorobj.FromControl("NImage1")
eventobj1.New1(doorobj.value,"MouseDown")
eventobj2.New1(doorobj.value,"MouseMove")
eventobj3.New1(doorobj.value,"MouseUp")
NImage1 is a NativeImage
doorobj is an object from the door library
eventobj1, 2 and 3 are events from the door library
On the marked line I get the following error message:
On the PC
"An object of type DBasic.Other.SWrapObject can not be converted to type System.Windows.Forms.Control." (Translated from dutch)
On the device:
Invalid cast exception
Am I doing somethging wrong?
Harry