If you are using VS 2008:
First create a Windows Forms application project. You can delete the default form (Form1.cs) if you do not plan to use it.
In Solution Explorer, right-click the Links link and select Add Link . This is where you add your custom C # DLL.
Now open Program.cs and make the following change:
using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using ****your DLL namespace here**** namespace WindowsFormsApplication2 { static class Program {
If the DLL contains unrelated forms, you probably need to add a class to the winforms project to coordinate the behavior of the forms.
source share