Y
YYZ
I'm new to VB.net, but not new to OO in general, and I'm very strong in VB6.
However, I don't know what I did in VB.net to cause this to happen.
I've got 2 projects open at the same time, in the same solution. One is a Class
Library project that contains 1 form and 1 class. The other project is a normal
Windows app, and contains 2 forms, both inherited from the form in the class
library, by adding the line "Inherits PCG.ClassLib.frmPCGGen (yeah, that's my
testing root namespace, and frmPCGGen is just a temporary form name while
testing out all this inheritance stuff).
Well, yesterday I could have sworn things were working fine, but today, if I try
to open up any of the forms to add controls to them, I get an error message
(actually, sometimes 2), first is "Object reference not set to an instance of an
object" on line 0, no filename...
Now that I think of it, here's what I did. I added code into the frmPCGGen (in
the class library) to save the settings of the form to the registry. To do
this, it basically looks into the EntryAssembly...well, I'm assuming that this
is a problem, since, when viewing in the designer, there IS no entry assembly.
Does that sound about right to anyone? Is there anyway I can figure out if the
code is trying to run when instantiated in the designer vs running compiled?
Anyone else run into this, and have an elegant solution for me?
Matt
However, I don't know what I did in VB.net to cause this to happen.
I've got 2 projects open at the same time, in the same solution. One is a Class
Library project that contains 1 form and 1 class. The other project is a normal
Windows app, and contains 2 forms, both inherited from the form in the class
library, by adding the line "Inherits PCG.ClassLib.frmPCGGen (yeah, that's my
testing root namespace, and frmPCGGen is just a temporary form name while
testing out all this inheritance stuff).
Well, yesterday I could have sworn things were working fine, but today, if I try
to open up any of the forms to add controls to them, I get an error message
(actually, sometimes 2), first is "Object reference not set to an instance of an
object" on line 0, no filename...
Now that I think of it, here's what I did. I added code into the frmPCGGen (in
the class library) to save the settings of the form to the registry. To do
this, it basically looks into the EntryAssembly...well, I'm assuming that this
is a problem, since, when viewing in the designer, there IS no entry assembly.
Does that sound about right to anyone? Is there anyway I can figure out if the
code is trying to run when instantiated in the designer vs running compiled?
Anyone else run into this, and have an elegant solution for me?
Matt