I have a project which has two solutions, one for .NET on the PC and
one for .NET on mobile devices, most of the code is shared between the
two projects in a commmon folder, but both projects have thier own
version of Form1.
The problem is that there is a lot of code in Form1 that could be
shared between the two projects, really the only major differences are
in the windows form designer code.
I recently have been trying to make a new class that inherits the
project specific Form1, i have stripped out all but the Constructor
and the Form designer code (declarations,initializecomponent) from
form1.
The new class inherits simply inherits the controls and
initializecomponent from Form1. The new class contains all of my
worker subs and the control events etc.
The problem i am having is that when i go to access one of the
controls (after the constructer and initializecomponent have been
called), it gives a System.NullReference Exception "Object reference
not set to an instance of an object." yet i can see the control and
its properties as part of the ME reference under locals in the
debugger.
Any ideas on what i'm doing wrong?
Cheers,
Owen W.