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
    X.show()
End main
LVL 15
Ess KayEntrapenuerAsked:
Who is Participating?
 
Ess KayConnect With a Mentor EntrapenuerAuthor Commented:
Im sure, same happens to me as it would to you
12

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.



UPDATE:
Got it to work
ex.jpg
0
 
Kyle AbrahamsSenior .Net DeveloperCommented:
You should be able to use the load from to do that:
http://msdn.microsoft.com/en-us/library/1009fa28.aspx

Dim myDLL as Assembly = LoadFrom("\\A\myDLL.dll")
Dim x as new myDLL.Form1
x.Show()
0
 
Ess KayEntrapenuerAuthor Commented:
should, but doesn't
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
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?
0
 
Kyle AbrahamsSenior .Net DeveloperCommented:
frmReturn might be null.
try to instantiate it
myDLL.frmReturn = new myDLL.frmReturn

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

converted to vb
0
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.

All Courses

From novice to tech pro — start learning today.