Hi, I'm trying to use a dll to hold forms & code and instantiate them from an exe.
I can successfully do it when there is only one form in the dll. The problem I am having is when there are multiple forms in the one dll.
I load the dll to form 1. The user clicks a button and the code is supposed to open up form2 and execute some code. The error I am getting is:
"An unhandled exception of type 'System.NullReferenceException' occurred in add transactions.dll
Additional information: Object reference not set to an instance of an object."
When this dll is built as an exe, it loads up on a module that has the "Sub Main" module in it and all forms work properly in an exe.
My question is, how do I have forms successfully interacting with each other under a dll environment? Or, Can I get the loading exe to call the "Sub Main" module first in the dll?
Your help is appreciated.
Thank you
I can successfully do it when there is only one form in the dll. The problem I am having is when there are multiple forms in the one dll.
I load the dll to form 1. The user clicks a button and the code is supposed to open up form2 and execute some code. The error I am getting is:
"An unhandled exception of type 'System.NullReferenceException' occurred in add transactions.dll
Additional information: Object reference not set to an instance of an object."
When this dll is built as an exe, it loads up on a module that has the "Sub Main" module in it and all forms work properly in an exe.
My question is, how do I have forms successfully interacting with each other under a dll environment? Or, Can I get the loading exe to call the "Sub Main" module first in the dll?
Your help is appreciated.
Thank you