windows forms

  • Thread starter Thread starter Jessica Weiner
  • Start date Start date
J

Jessica Weiner

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
 
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
 
Steven Nagy said:
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();
 
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
 
Adam Cooper said:
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
 
Back
Top