I have an windows form with two button, i have converted this windows form to an dll. The dll is here

namespace projdll
    public partial class abc : Form
        public int i = 0;
        public abc()


        private void button1_Click(object sender, EventArgs e)
            MessageBox.Show("BUTTON 1");

        private void button2_Click(object sender, EventArgs e)
            MessageBox.Show("BUTTON 2");

Now in other application i add reference to this dll dynamically using assembly.loadfrom() . I hav 2 ques

1) I need to know the name of the class in dll and create an object for it. Name of only this form class. In win app we will hav others class like program.cs, resources.cs etc exclude these classes.
2) Need to dynamically create object for windows form class and call show() method to run the app in dll

Thank You

Edited by mike_2000_17: Fixed formatting

7 Years
Discussion Span
Last Post by Momerath
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.