Reference Equivelants in .net
-
A project in VB6 had a reference to a DLL. When the project started it made a decision to load this DLL or not load it (based on reading a configuration setting from a file) If it needed to load it it would launch the DLL which opened a separate window. After upgrading to .NET, I am not sure how this reference equivalent is done, but when I start my project it always loads this DLL, whether or not I want it to. It appears to load it in the InitializeComponent, but I do not understand why, or how I can prevent it from loading the DLL when I start the project. It is after the initializeConponent that the program looks for the config setting to determine it it should load this. Any idea how I need to handle this?
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
m_vb6FormDefInstance = Me
End If
'This call is required by the Windows Form Designer.
InitializeComponent() ' loads my dll here for some reason
End SubAny help or point in a good direction is appreciated... No-e
-
A project in VB6 had a reference to a DLL. When the project started it made a decision to load this DLL or not load it (based on reading a configuration setting from a file) If it needed to load it it would launch the DLL which opened a separate window. After upgrading to .NET, I am not sure how this reference equivalent is done, but when I start my project it always loads this DLL, whether or not I want it to. It appears to load it in the InitializeComponent, but I do not understand why, or how I can prevent it from loading the DLL when I start the project. It is after the initializeConponent that the program looks for the config setting to determine it it should load this. Any idea how I need to handle this?
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
m_vb6FormDefInstance = Me
End If
'This call is required by the Windows Form Designer.
InitializeComponent() ' loads my dll here for some reason
End SubAny help or point in a good direction is appreciated... No-e
I strongly suspect that one of the controls you are using in your upgraded application uses some method/control from the VB6 dll. That is the only way I know that the dll can get loaded in InitializeComponent(). Just in case you don't know how to use the dll in code, here[^] is a link I have found useful in the past, although there are loads more out there.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”