P
programcounter
Hello,
I have written 2 controls for a SmartDeviceApplication (Control1.dll
and Control2.dll)
Now I will place Control2 on Control1. Both controls are derived from
System.Windows.Forms.Control and so it´s possible to set the Control2
by using the properties "Location" and "Size". During the "Build
Solution" - process of Control1 there are no errors.
But if I place the Control1 in the ToolBox of the .Net - Studio and
drag the Control1 to the Form of the SmartDeviceApplication I get an
error:
--> System.NullReferenceException: Object reference not set to an
instance
of an object!
at System.Windows.Forms.Controls.set_ParentInternal(Control
value)
Following code-fragement in Control1.dll initiate the exception:
--> this.myControl2.Location = new Point(10,10);
Thanks
I have written 2 controls for a SmartDeviceApplication (Control1.dll
and Control2.dll)
Now I will place Control2 on Control1. Both controls are derived from
System.Windows.Forms.Control and so it´s possible to set the Control2
by using the properties "Location" and "Size". During the "Build
Solution" - process of Control1 there are no errors.
But if I place the Control1 in the ToolBox of the .Net - Studio and
drag the Control1 to the Form of the SmartDeviceApplication I get an
error:
--> System.NullReferenceException: Object reference not set to an
instance
of an object!
at System.Windows.Forms.Controls.set_ParentInternal(Control
value)
Following code-fragement in Control1.dll initiate the exception:
--> this.myControl2.Location = new Point(10,10);
Thanks