?
Solved

HowTo import DLL file in form

Posted on 2014-04-02
7
Medium Priority
?
394 Views
Last Modified: 2014-04-07
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
0
Comment
Question by:Ess Kay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 39972409
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
 
LVL 15

Author Comment

by:Ess Kay
ID: 39972634
should, but doesn't
0
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 39972687
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Accepted Solution

by:
Ess Kay earned 0 total points
ID: 39972727
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
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 39972829
frmReturn might be null.
try to instantiate it
myDLL.frmReturn = new myDLL.frmReturn

and then show it:
myDLL.frmReturn.Show()
0
 
LVL 15

Author Comment

by:Ess Kay
ID: 39973016
thanks kyle. the solution i posted works
0
 
LVL 15

Author Closing Comment

by:Ess Kay
ID: 39982592
found solution here: http://www.a1vbcode.com/snippet-3215.asp

converted to vb
0

Featured Post

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question