HI all,
I created an apllication and a dll.
Can somebody provide me a simple piece of code, how to load the dll and load a form created in the dll and how to unload the dll after closing the form inside the dll.
Thanks,
AXH
Printable View
HI all,
I created an apllication and a dll.
Can somebody provide me a simple piece of code, how to load the dll and load a form created in the dll and how to unload the dll after closing the form inside the dll.
Thanks,
AXH
Can somebody help me with this ??
Well , I don't know what is this form you want to load from the dll . Is this dealing with plugins archit. ?
Just a normal windows form
In what lang did you write that dll ?
vb.net (class library)
OK , the general idea of loading a dll is as follow :
First , reference your dll by right clicking on the Reference item in the project explorer . Browse to your dll . Click Select and then OK .
Secondly , import your dll in your form or whatever by typing first the namespace something like this :
VB Code:
Imports MYAPPLICATION.MyClassForm
Thirdly , Instantiate an obj and use the methods inside it as you do with anyother obj in .NET .
VB Code:
Dim MyCls As New MyClassForm MyCls.Your methods here
I still don't know if this would help you in anyway .
Thanks, it's working
By the way,
I will split up my program by using dll's.
Is there a program or a something else to check if the dll is available so I can catch the fault message and write a program to download the specific download.
Thanks again
AXH
Umm , what do you mean by splitting up your app into dlls ?
I will split up my program up in for example query / export /import / maintenance
So I thought I will make four seperate dll's
Not a good idea ? or do you have a other option
AXH
For me , I wouldn't bother making 4 dlls . You have either these options :
1-Pack your Classes & Functions into one dll .
Or
2-Put them in separate modules , let's say 4 modules if that's possible in your case .
Advantage of the second option :
1-Faster when making updating , corrections , addition , deletion ...etc to the source code .
2-Much more eaiser when deploying your app . No need to look for the dlls , no possiblity of losing your dlls (i.e can't delete these dlls )
Why is there no need for looking for dll's
Before I start the program and I will move the dll or rename the dll I will get an exception error!
Because the file name has been changed either by its name or the location and is no longer accessible from your proj . In this case if you did any of the above operation you have to re-reference the file .Quote:
Originally posted by ahollaar
Why is there no need for looking for dll's
Before I start the program and I will move the dll or rename the dll I will get an exception error!
And for example a stupid user delete / moved the dll what todo then. The progrma will generate an error
Yes .