|
-
Sep 8th, 2002, 06:23 PM
#1
Thread Starter
Junior Member
No output from Console.WriteLine
Ok I have an app that I run from either GUI or console...
For some reason the following line will NOT output anything 
Console.WriteLine("some stuff")
I can get console arguments just fine, so it knows its coming from console, but it simply will not output anything.
I know its in teh right spot because I can call a message box right after the .writeline statement.
I've also tried Console.Write and although it doesn't matter System.Console.WriteLine and nothing gives me any output at all..
This doesn't seem like a difficult problem, but I don't get any errors so its a little more difficult to track down the problem.
I've even put the following line into the code, with no help
System.Console.SetOut(Console.Out)
Any ideas?
-
Sep 8th, 2002, 07:22 PM
#2
Lively Member
When you write Console.WriteLine("This Text") it will output the result to the debug window.
But are you talking about the command console? <MSDOS looking thing> I'll assume thats what you mean, you output text like this
Console.Out.WriteLine("This Text")
-
Sep 8th, 2002, 10:20 PM
#3
Thread Starter
Junior Member
-
Sep 8th, 2002, 11:01 PM
#4
Thread Starter
Junior Member
ok just found the limitation...
When I run the application normally it still pops up with command prompt and immediately goes into the GUI...
SO
How do I change standard output at runtime?
Thanks
-
Sep 9th, 2002, 08:32 AM
#5
change the compile target from winexe to exe.
-
Sep 9th, 2002, 03:25 PM
#6
Thread Starter
Junior Member
That's sounding like a compile time deal..
I just need it to be able to output to console when run from command line, but when you double click on the application I don't want the command prompt opening up first... just open the application. Wouldn't that be something that would require a runtime change?
-
Sep 9th, 2002, 03:45 PM
#7
sorry but i dont think you can have it both ways.. At least not to my knowledge.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|