By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,424 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,424 IT Pros & Developers. It's quick & easy.

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

P: n/a
Jax
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
Nov 15 '05 #1
Share this Question
Share on Google+
4 Replies


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

Willy.

"Jax" <an*******@discussions.microsoft.com> wrote in message
news:87**********************************@microsof t.com...
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

Nov 15 '05 #2

P: n/a
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" <an*******@discussions.microsoft.com> wrote in message
news:87**********************************@microsof t.com...
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

Nov 15 '05 #3

P: n/a
Jax
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?
Nov 15 '05 #4

P: n/a
=?Utf-8?B?SmF4?= <an*******@discussions.microsoft.com> wrote in
news:1F**********************************@microsof t.com:

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
Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.