Command prompt opens up with form application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created the .exe using CodeDom and writing a batch file which then compiled the .cs into a windows form application.
The forms application is a CARBON COPY of the standard windows form template that you get when starting a new Form App in VS.
When the .exe runs a commnd prompt/dos-like window appears alongside the form. If this is closed the form closes too and visaversa.
I'd like to hide it but I can get a handle on it becuase the only code that really runs is:

Application.Run(new myCustomForm());

// myCustomForm being the name of my form.

Can anyone help?

Jax
 
Jax said:
I created the .exe using CodeDom and writing a batch file which then
compiled the .cs into a windows form application.
The forms application is a CARBON COPY of the standard windows form
template that you get when starting a new Form App in VS.
When the .exe runs a commnd prompt/dos-like window appears alongside the
form. If this is closed the form closes too and visaversa.
I'd like to hide it but I can get a handle on it becuase the only code that really runs is:

Application.Run(new myCustomForm());

// myCustomForm being the name of my form.

Can anyone help?

Jax

Right click the project in Solution Explorer, click Properties and set
output type to Windows Application.

HTH
Eric
 
Right click the project in Solution Explorer, click Properties and set
output type to Windows Application.

There is no solution here, as I understand it - the exe file is
compiled effectively from the command line, not VS.NET.
 
Jax said:
I created the .exe using CodeDom and writing a batch file which then
compiled the .cs into a windows form application. The forms
application is a CARBON COPY of the standard windows form template
that you get when starting a new Form App in VS. When the .exe runs a
commnd prompt/dos-like window appears alongside the form. If this is
closed the form closes too and visaversa. I'd like to hide it but I
can get a handle on it becuase the only code that really runs is:

When you compile with csc, use /t:winexe instead of either /t:exe or
just nothing.
 
ah, silly me.

Eric
Jon Skeet said:
There is no solution here, as I understand it - the exe file is
compiled effectively from the command line, not VS.NET.
 
Back
Top