I deleted default Form1 from my project and added another Windows Form as MyForm().How to set this to run as application.
In fact I replaced
Application.Run(new Form())
to
Application.Run(new MyForm())
But its giving the following error:
Error 1 The type or namespace name ‘MyForm’ could not be found (are you missing a using directive or an assembly reference?)
Check the namespace of your new form and ensure that the application has it as a
usingdirective.The error means that the
applicationclass can’t find theMyFormclass, either because you didn’t add the right assembly reference to the project (which could happen if the form is in another project), or because the form is in a different namespace (which could happen if you put it in another directory).