471,337 Members | 848 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

windows forms

I have an simple application that opens up a windows form. However, whenever
I run the executable, the dos window appears in the back How can I get rid
of that?

Thanks.
Jess
Dec 15 '05 #1
4 1531
Did you create a console application or a windows application?
What OS are you running?
Post some code?

This can sometimes just be an OS thing as well. I think this use to
happen to me in Win98...

Steven Nagy

Dec 15 '05 #2
"Steven Nagy" <le*********@hotmail.com> wrote:
What OS are you running?
Post some code?


I am running windows xp and build the application from ground up (i.e. did
not use VS .net to declare if my application is a console app or windows
app)
Here's the code for my form.

talk = new Form();
talk.Controls.Add(new TextBox());
talk.Controls[0].Dock = DockStyle.Fill;
talk.Controls.Add(new TextBox());
talk.Controls[1].Dock = DockStyle.Bottom;
((TextBox)talk.Controls[0]).ReadOnly = true;
((TextBox)talk.Controls[0]).Multiline = true;
((TextBox)talk.Controls[1]).Multiline = true;
((TextBox)talk.Controls[1]).KeyUp += new KeyEventHandler(key_up);
talk.Size = new System.Drawing.Size(300, 400);
talk.Show();

----------------
Jess
Dec 16 '05 #3
Hi,

When you compile your application, you can specify to the compiler(csc
for c#) whether you want this to be a console application or win
application by using a parameter.

For building a console application
/target:exe

For building a windows executable
/target:winexe

Two others, module & library:
/target:library
/target:module
For example:

csc /target:winexe file.cs

Cheers,
Adam Cooper
-------------------------------------------------------------------------------------------
J-Integra Interoperability Solutions
http://j-integra.intrinsyc.com/
high performance interop middleware for java, corba, com & .net

Dec 16 '05 #4

"Adam Cooper" <ad*********@gmail.com> wrote:
Hi,

When you compile your application, you can specify to the compiler(csc
for c#) whether you want this to be a console application or win
application by using a parameter.


thanks a lot. that solved my problem.

-Jess
Dec 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Ayende Rahien | last post: by
reply views Thread by gxl034000 | last post: by
21 posts views Thread by Dan Tallent | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.