Solved

HowTo import DLL file in form

Posted on 2014-04-02
7
380 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
  • 4
  • 3
7 Comments
 
LVL 39

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 39

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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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 39

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now