Hi,
If you have the fully qualified type name as a string you can do something like this:
string s = "MyNamespace.FormName";
System.Windows.Forms.Form f = (System.Windows.Forms.Form)Activator.CreateInstance(Type.GetType(s));
f.Show();
HTH,
Viv
>Is there a way to instantiate a windows form by storing the name of the form in a variable then using the variable to instantiate it?
>
>The reason why I'm asking is to minimize the code that I have to write in a switch statement since we have more than 100 modules in our application.
>
>I'm wondering if there is a way just the way we do it in Visual Foxpro.
>
>
>Thanks in advance...