dll files

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts Page 1 of 1
Contributors
User avatar
dan2130
VIP - Donator
VIP - Donator
Posts: 104
Joined: Sat Sep 26, 2009 3:39 am

dll files
dan2130
Hi, when i do a dll i need to show a form after action but when i write form1.show() at the end of the sub the dll file say to me an error but i want to do that application with dll for more compatibility with the others apps i will made but if you know how i can open a form by a sub in a dll please can you tell that to me i have searched and i have found nothing or i found only how to say a msgbox.

thanks in advance
admin@adosrv.net
Owner of ado-srv.net softwares network.
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Re: dll files
CodenStuff
Hello,

If you want to show a form from your DLL you first need to add a form to the dll project. If you want to show the form using code inside the dll file then putting a sub inside the dll should work like:
Code: Select all
Public Sub ShowForm()
Form1.ShowDialog()
End Sub
If you want to show the form from your DLL using code inside your main application then you need to create a new instance of it like this:
Code: Select all
Dim ShowForm As New NameOfYourDLLFile.Form1
ShowForm.ShowDialog()
Replace "NameOfYourDLLFile" with the name of your DLL and dont forget you need to add your DLL as a reference in your main application though cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
dan2130
VIP - Donator
VIP - Donator
Posts: 104
Joined: Sat Sep 26, 2009 3:39 am

Re: dll files
dan2130
i can not open a form in the main application from the dll like the code of the dll open the form 2 of the main application (windows application)
admin@adosrv.net
Owner of ado-srv.net softwares network.
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Re: dll files
CodenStuff
Hello,

As far as I know your not going to be able to do that directly unless you make the dll inside the same project as your main application.

What exactly are you trying to do though? . I mean why does your DLL need to open a form from your main application?
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
dan2130
VIP - Donator
VIP - Donator
Posts: 104
Joined: Sat Sep 26, 2009 3:39 am

Re: dll files
dan2130
ok
admin@adosrv.net
Owner of ado-srv.net softwares network.
5 posts Page 1 of 1
Return to “Tutorial Requests”