Click here to Skip to main content
15,895,538 members
Home / Discussions / C#
   

C#

 
GeneralRe: 5 objects of that class Pin
Malcolm Smart10-Oct-07 21:46
Malcolm Smart10-Oct-07 21:46 
QuestionHow to convert/read c++ code from c#? Pin
zaiyatul hijah10-Oct-07 16:44
zaiyatul hijah10-Oct-07 16:44 
AnswerRe: How to convert/read c++ code from c#? Pin
Paul Conrad12-Oct-07 13:35
professionalPaul Conrad12-Oct-07 13:35 
QuestionI need a file viewr please Pin
hom.rcp10-Oct-07 14:52
hom.rcp10-Oct-07 14:52 
AnswerRe: I need a file viewr please Pin
Christian Graus10-Oct-07 15:31
protectorChristian Graus10-Oct-07 15:31 
GeneralRe: I need a file viewr please Pin
PIEBALDconsult10-Oct-07 15:32
mvePIEBALDconsult10-Oct-07 15:32 
AnswerRe: I need a file viewr please Pin
Matthew Cuba10-Oct-07 15:39
Matthew Cuba10-Oct-07 15:39 
QuestionForm as Command Line Pin
SDEspiritu10-Oct-07 12:06
SDEspiritu10-Oct-07 12:06 
I've written a Windows Form application and am trying to adapt it as a command line utility.

Target Behaviour:
1) When I run by double-clicking the exe it runs as a windows application.
2) When I open a command line and execute it without params it opens as a windows application.
3) When I open a command line and execute it with params it runs as a command line tool and outputs to the console.


What I'm seeing:
If I define the project as a Console Application then my form displays, but it also opens a console in the background. This is ugly.

If I define the project as a Windows Applicaiton then it accomplishes 1 and 2, but doesn't output to the console for 3.

Here's my entry point code:
static void Main(string[] args)
{
if (args.Length > 0)
{
CommandLine.Run(args);
}
else
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Main());
}
}

What am I missing here?
If I need to define the project as a Console Application how can I supress the console? (sounds hoaky, I know)


Thanks,
Shaun
AnswerRe: Form as Command Line Pin
PIEBALDconsult10-Oct-07 13:13
mvePIEBALDconsult10-Oct-07 13:13 
GeneralRe: Form as Command Line Pin
PIEBALDconsult10-Oct-07 13:42
mvePIEBALDconsult10-Oct-07 13:42 
GeneralRe: Form as Command Line Pin
SDEspiritu11-Oct-07 4:48
SDEspiritu11-Oct-07 4:48 
QuestionIIS Configuration Pin
raygn210-Oct-07 11:40
raygn210-Oct-07 11:40 
AnswerRe: IIS Configuration Pin
Yitzchok Dev10-Oct-07 19:50
Yitzchok Dev10-Oct-07 19:50 
QuestionEvents should not return values?! Pin
Domenic Denicola10-Oct-07 11:14
Domenic Denicola10-Oct-07 11:14 
AnswerRe: Events should not return values?! Pin
Christian Graus10-Oct-07 11:25
protectorChristian Graus10-Oct-07 11:25 
GeneralRe: Events should not return values?! Pin
Domenic Denicola10-Oct-07 11:31
Domenic Denicola10-Oct-07 11:31 
GeneralRe: Events should not return values?! Pin
Robert Rohde10-Oct-07 11:44
Robert Rohde10-Oct-07 11:44 
GeneralRe: Events should not return values?! Pin
Domenic Denicola10-Oct-07 11:57
Domenic Denicola10-Oct-07 11:57 
GeneralRe: Events should not return values?! Pin
lmoelleb10-Oct-07 20:53
lmoelleb10-Oct-07 20:53 
AnswerRe: Events should not return values?! Pin
Skippums10-Oct-07 11:39
Skippums10-Oct-07 11:39 
GeneralRe: Events should not return values?! Pin
Domenic Denicola10-Oct-07 11:42
Domenic Denicola10-Oct-07 11:42 
GeneralRe: Events should not return values?! Pin
Skippums11-Oct-07 4:57
Skippums11-Oct-07 4:57 
QuestionPublic and protected property Pin
Fernando A. Gomez F.10-Oct-07 11:07
Fernando A. Gomez F.10-Oct-07 11:07 
AnswerRe: Public and protected property Pin
Patrick Etc.10-Oct-07 11:08
Patrick Etc.10-Oct-07 11:08 
GeneralRe: Public and protected property Pin
Fernando A. Gomez F.10-Oct-07 11:13
Fernando A. Gomez F.10-Oct-07 11:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.