Run Windows form Application
Up to this we have learned about create windows application and add new windows form in windows application. In this c# windows application post we will learn to run application.
After creating a new windows application, we want to see the output of our application. For checks output of application, we need to debug application. The Debug and Run is main part of any windows application.
Run application = Press F5 Key OR Debug Menu -> Start Debugging
Build application = Press Ctr + Shift + b
Stop Debugging = Shift + F5 OR Debug Menu -> Stop Debugging
Start Debugging (F5 Key)
First we need to build application using Ctr+Shift+b, it will checks everything if there are any errors or not. If the message Build Succeeded display then run application using F5 key or in Debug Menu Select Start Debugging button.
Stop Debugging (Shift + F5)
After successful run application, when we want to come back to normal programming mode we need to Stop Debugging using Shift + F5 key or Debug menu select Stop Debugging option.
Build application (Ctr + Shift + b)
For build application right click on project in solution explorer and select Build option to build application. while build process it will checks everything if there are any errors or not.
After successful building a application, as a result it will produce a .exe file. The .exe file is executable file of an application, means we can run application using this .exe file. Here, we can see in below figure bin/Debug folder there is MyFirstProject.exe file.
We can find out .exe file in local system at “ProjectFolder/bin/Debug/.exe”. Here, in our application we can find out .exe file from “MyFirstProject/bin/Debug/MyFirstProject.exe”. We can run application through .exe file, without open an application in visual studio.
Here, we can see .exe file location in local system in below figure.
If we want, we can create a exe file shortcut on desktop to run application.
We hope this c# windows form application post, will help you to understand how to run windows application.
Next, c# windows application post we will learn about how to set default form for run.