Forms in DLL's

Submitted on: 1/1/2015 2:51:00 AM
By: Jose Fuentes VB MVP (from psc cd)  
Level: Beginner
User Rating: By 3 Users
Compatibility: VB.NET
Views: 3899
     Have you ever wanted to build UI components to be used everywhere well you can build them in a DLL and use them everywhere. "note this was possible without tricks in vb6"

				Ok it's pretty simple if you want to make a DLL that has a form or even more then one form on it then do this.
first open a new windowforms project
name it and hit ok
ok now on the project name in the solution builder listing the files right click and hit properties.
Go to the output type dropdown and select class libaray and boom you are done now comple it and then bring it in as a reference into your exe project and you can now use the forms in the dll
dim hi as new testdll.form1
boom your done.
now for debuging your forms in the dll you can build a windowsforms app exe that uses the dll and then in the DLL project going to the same right click and properites of the project you will find configuatjion properties and under debuging you can set it to run an external application just set that on your test.exe that uses the dll and boom you are ready to debug.
FYI if you make a change in the dll you will need to recompile the test.exe before going into debug again.
Hope this helps

Other 18 submission(s) by this author


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

 There are no comments on this submission.

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)

To post feedback, first please login.