How to Run C# Windows Form Application



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.

meeraacademy.com
How to run c# windows form application.
meeraacademy.com
How to debug windows from application in visual studio 2012.

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.

meeraacademy.com
Stop debugging in windows application

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.

meeraacademy.com
How to debug windows from application.

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.

meeraacademy.com
How to debug windows from application in visual studio 2012.

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.

meeraacademy.com
Find out the location of .exe file in local system.

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.


 

Leave a Reply

Your email address will not be published. Required fields are marked *