Compiling an form app via a .bat and cmd.exe. Why command line on load?

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

Guest

I am creating an executable using CodeDom.
Once the file is written, a batch file is built and runs that compiles the .cs file into an exe.
Everything is fine (well almost, i'm posting twice), but when I run the exe a command prompt/dos like window pops up as well as the form.
The file i'm running at present is IDENTICAL to a completely blank windows form application built with VS.
So why does my version have this command line and why doesn't the ones produced by VS?
I want to minimize or hide this command prompt but because all I am running is: Application.Run(new Form1()); I dont have a handle on it to hide it.
Can anyone help?

Jax
 
Run csc /? and take a look at the options, more precisely the target option.

Willy.
 
Hi Jax,
That is because your application is compiled as a an console application.
You should compile it with option /target:winexe

--
HTH
B\rgds
100

Jax said:
I am creating an executable using CodeDom.
Once the file is written, a batch file is built and runs that compiles the ..cs file into an exe.
Everything is fine (well almost, i'm posting twice), but when I run the
exe a command prompt/dos like window pops up as well as the form.
The file i'm running at present is IDENTICAL to a completely blank windows
form application built with VS.
So why does my version have this command line and why doesn't the ones produced by VS?
I want to minimize or hide this command prompt but because all I am
running is: Application.Run(new Form1()); I dont have a handle on it to hide
it.
 
Thanks for that Stoitcho, thanks also to Willy, I couldn't get up the list of possibilites because i've got fu*king XP which doesn't allow you to have a large sized cmd prompt, so I couldn't actually see all of the definitions, I then caught up in something else and forgot about it
Does anyoe know how I can get a version of dos that runs in a large window? On XP?
 
Thanks for that Stoitcho, thanks also to Willy, I couldn't get up the
list of possibilites because i've got fu*king XP which doesn't allow
you to have a large sized cmd prompt, so I couldn't actually see all
of the definitions, I then caught up in something else and forgot
about it. Does anyoe know how I can get a version of dos that runs in
a large window? On XP?

Last time I checked xp (and pretty much all the other flavors of windows)
let you change the size of the console window. I definately changed mine
(on xp pro).

Mark
 
Back
Top