Hi Harshad,
> Ususally we do like:
>
[quoted text clipped - 3 lines]
> SalesOrderForm is a type. How can I create an instance of SalesOrderForm
> when I do not know its type at run tyme? For example
Runtime or design time? At runtime you'll have to know what and where, how
else would you be able to create the form.
> public openForm (string formName)
> {
> // here I might get "SalesOrderForm" or something else. If I get
> "SalesOrderForm" then I want to open it.
> Here, it will also be NOT known which assembly this for is in.
> }
If the form name contains all the information about assembly name and form
name you can use reflection to create that type. Don't know out of my head
how to do that but reflection is the thing to look at. .Net assemblies can
be registered in the GAC with a strong name, alternatively you can make them
accessible through COM (automatic COM wrapper). Then you could create a form
of type "MyAssembly.MyForm".
Hope this helps,
Christoph