Referencing external forms

  • Thread starter Thread starter pipbailey
  • Start date Start date
P

pipbailey

I have a VB.net EXE application (VS05). It is really just an empty MDI
container for lots of forms that are also VB.net forms, but are in
other external DLL assemblies (some VS03 others VS05). I have built
two such external assemblies and loading the forms in my EXE container
is easy. I just reference the assembly in Project References and then
import the namespace. Bingo!

My question is that the project references screen displays the
absolute path to these assemblies on my computer. When I deploy these
assemblies using multiple MSI installpacks their locations may change
(depending on where the user choose to install them). Is my container
going to find these DLLs on the deployment machine and use them OK?

Is there a way to load a reference dynamically in the code and use a
form on the fly without having the project reference set in the IDE?

Thanks,

Philip
 
My question is that the project references screen displays the
absolute path to these assemblies on my computer. When I deploy these
assemblies using multiple MSI installpacks their locations may change
(depending on where the user choose to install them). Is my container
going to find these DLLs on the deployment machine and use them OK?

It depends. If the assemblies are stored in the Global Assembly Cache
(GAC), then yes, your app should find them. Otherwise, they need to be
either in the same directory as your EXE or in one of the "probing
paths" defined in your app.config file.
Is there a way to load a reference dynamically in the code and use a
form on the fly without having the project reference set in the IDE?

Look into reflection. Specifically, Assembly.Load and
Activator.CreateInstance.
 
Back
Top