Hi Hossam,
If you try to create a new Winform project => right-click the project name => Add => New Item… => select C# Items - Form (Windows Forms) => change it’s name to Form2.cs => click Add => drag one control to this new form for example a button => double click to open Program.cs file => modify the code line from Application.Run(new Form1());
to Application.Run(new Form2());
and then click to run the project, will the form2 show as the startup form?
If the form2 shows as the startup form, may I ask if you accept this method to change the startup form(change the code)? If you accept this method and do the same thing for your project, then will it work for your project(if it doesn’t work, please share us a minimal reproducible sample to check further, perhaps the issue is hidden in your specific project)? If you don’t accept this method, may I know if you have any concerns?
If the form2 doesn’t show(not applied), then please try following:
- Repair Visual Studio from VS Installer => More => Repair.
- Reset Visual Studio settings by following this document: Reset all settings.
- If you are using any extensions, please try to disable them temporarily and test again.
- If it is acceptable, please try to uninstall and reinstall Visual Studio.
- If all of the above don’t work, please open VS => click Help => Send Feedback => Report a Problem…
Feel free to let us know the result.
Sincerely,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.