bit82lorry
New member
- Joined
- May 3, 2019
- Messages
- 3
- Programming Experience
- 5-10
Hi All
I am trying to resolve an "Object reference not set to an instance of an object. " during the design time.
Basically I have a base form with a button only (Form1.vb). And I have another Form2 inheriting from Form1. In the Form_Load event of Form1, I need to access to a global variable from another DLL.
If I compile and run, it works, but problem is when I try to load the form2 during design time, I get an error and the design UI doesn't load properly and show an error with the above mentioned message. Anyone with any ideas on how to resolve this kind of problem.
I have provided the source code and the solution is also provided. I am running this code base in Visual Studio 2008 Professional SP1.
Tks in advance.
I am trying to resolve an "Object reference not set to an instance of an object. " during the design time.
Basically I have a base form with a button only (Form1.vb). And I have another Form2 inheriting from Form1. In the Form_Load event of Form1, I need to access to a global variable from another DLL.
If I compile and run, it works, but problem is when I try to load the form2 during design time, I get an error and the design UI doesn't load properly and show an error with the above mentioned message. Anyone with any ideas on how to resolve this kind of problem.
I have provided the source code and the solution is also provided. I am running this code base in Visual Studio 2008 Professional SP1.
Tks in advance.
Attachments
Last edited by a moderator: