S
S
Sergey Polyntsev2014-03-22 15:08:14
Programming
Sergey Polyntsev, 2014-03-22 15:08:14

How to create a DLL containing a form?

Hello everyone) Is it possible to make a dll-library so that it contains a form?
The final task is that I want to make the appearance of the form myself, and I want to display several forms from one program, so I need them all to have one design, and I would like to achieve this through a dll. I write in C# studio.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fart, 2014-03-22
@The_Chemis

Can. something like that:

сборка dll:
.............
namespace testform
{
    public partial class FormDll : Form
    {
        public FormDll()
        {
            InitializeComponent();
        }
    }
}
.............
приложение
Assembly assembly = Assembly.LoadFile("C:\\prg\\testform.dll");
Type type = assembly.GetType("testform.FormDll ");
Form form = (Form)Activator.CreateInstance(type);
form.ShowDialog();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question