You can change the command to start the application from the command line:
start /wait YourApplication.exe
In general, the command line behavior depends on the subsystem used by your application (console / Windows). As an application with a subsystem, Windows does not have standard I / O streams; there is no need to wait until the console waits for them.
But you can change your application as a console application and use your existing forms as usual. This link shows an example.
source share