I have my class, and I want one of the methods inside to create an instance of a form... but it won't let me. Is there something I don't know about to do with creating form instances from within class libraries?
Printable View
I have my class, and I want one of the methods inside to create an instance of a form... but it won't let me. Is there something I don't know about to do with creating form instances from within class libraries?
I think you need to do something like this:
PHP Code:static void Main(string[] args)
{
System.Windows.Forms.Form myform = new Form1();
myform.ShowDialog();
}
Well I don't see why that shouldn't work, so thanks!