• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

HowTo import DLL file in form

I'm running Visual Studio

I have a DLL on a server \\A\myDLL.dll
The Dll has forms inside it

i want to use it on my form importing it only from the form, not through references

I need to do soemthing like this in my form  (pseudocode)

Imports MyDLL1  <source="\\A\myDLL.dll" >

Sub main()
    Dim x as Mydll1.frmForm1
End main
Ess Kay
Ess Kay
  • 4
  • 3
1 Solution
Kyle AbrahamsSenior .Net DeveloperCommented:
You should be able to use the load from to do that:

Dim myDLL as Assembly = LoadFrom("\\A\myDLL.dll")
Dim x as new myDLL.Form1
Ess KayEntrapenuerAuthor Commented:
should, but doesn't
Kyle AbrahamsSenior .Net DeveloperCommented:
are you getting an error?  What happens if you try the DLL not on a server path?

Also what happens if you just add it as a reference to your other project for now?  does that work?
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Ess KayEntrapenuerAuthor Commented:
Im sure, same happens to me as it would to you

If i reference it in my program, it works fine, but I dont publish it to production. Thus, whoever publishes it will need to constantly update all DLLS, and this one may be frequently changing.

To avoid that, I would like to either add it to the project as an included file, or place it somewhere shareable.

Got it to work
Kyle AbrahamsSenior .Net DeveloperCommented:
frmReturn might be null.
try to instantiate it
myDLL.frmReturn = new myDLL.frmReturn

and then show it:
Ess KayEntrapenuerAuthor Commented:
thanks kyle. the solution i posted works
Ess KayEntrapenuerAuthor Commented:
found solution here: http://www.a1vbcode.com/snippet-3215.asp

converted to vb
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now