Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

HowTo import DLL file in form

Posted on 2014-04-02
7
Medium Priority
?
397 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 41

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 41

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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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 41

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
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…

604 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