Click here to Skip to main content
15,913,709 members
Home / Discussions / C#
   

C#

 
GeneralRe: Copying the current executing program to destination Pin
Dave Kreskowiak23-May-09 17:27
mveDave Kreskowiak23-May-09 17:27 
GeneralRe: Copying the current executing program to destination Pin
fly90424-May-09 0:10
fly90424-May-09 0:10 
QuestionConversion of visio files(.vsd) to .pdf files Pin
NarVish23-May-09 6:42
NarVish23-May-09 6:42 
AnswerRe: Conversion of visio files(.vsd) to .pdf files Pin
Douglas Troy23-May-09 7:09
Douglas Troy23-May-09 7:09 
QuestionDisplaying the output of a console application in a windows form. Pin
neoflame23-May-09 4:48
neoflame23-May-09 4:48 
AnswerRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 5:06
sitebuilderLuc Pattyn23-May-09 5:06 
GeneralRe: Displaying the output of a console application in a windows form. Pin
neoflame23-May-09 5:56
neoflame23-May-09 5:56 
GeneralRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 6:02
sitebuilderLuc Pattyn23-May-09 6:02 
Hi,

the code shown only included CancelOutputRead(); and no CancelErrorRead();

I tend to explicitly create a thread for reading stdout using a synchronous read in a while loop; similar for stderr. While the original thread waits for process exit (using a busy wait, i.e. a loop including a sleep(300)), waits one more second, then forces the other threads to terminate (gracefully if possible).
I started doing so back on Win98 where .NET 1.0 and 1.1 had some problems dealing with those externals streams, not sure it still is necessary nowadays.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

AnswerRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 6:06
sitebuilderLuc Pattyn23-May-09 6:06 
GeneralRe: Displaying the output of a console application in a windows form. Pin
neoflame23-May-09 10:11
neoflame23-May-09 10:11 
GeneralRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 10:19
sitebuilderLuc Pattyn23-May-09 10:19 
GeneralRe: Displaying the output of a console application in a windows form. Pin
neoflame23-May-09 11:04
neoflame23-May-09 11:04 
AnswerRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 11:25
sitebuilderLuc Pattyn23-May-09 11:25 
GeneralRe: Displaying the output of a console application in a windows form. Pin
neoflame23-May-09 11:32
neoflame23-May-09 11:32 
GeneralRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 11:37
sitebuilderLuc Pattyn23-May-09 11:37 
GeneralRe: Displaying the output of a console application in a windows form. Pin
neoflame23-May-09 12:44
neoflame23-May-09 12:44 
GeneralRe: Displaying the output of a console application in a windows form. Pin
Luc Pattyn23-May-09 12:51
sitebuilderLuc Pattyn23-May-09 12:51 
QuestionDataGridView Cursor Move. Pin
Ashwani Dhiman23-May-09 2:38
Ashwani Dhiman23-May-09 2:38 
AnswerRe: DataGridView Cursor Move. Pin
Eddy Vluggen23-May-09 3:42
professionalEddy Vluggen23-May-09 3:42 
QuestionCrystal report print by coding Pin
KIDYA23-May-09 2:12
KIDYA23-May-09 2:12 
AnswerRe: Crystal report print by coding Pin
_Maxxx_24-May-09 16:59
professional_Maxxx_24-May-09 16:59 
QuestionHow to move a drawn ball by Threading? Pin
pcsience23-May-09 0:01
pcsience23-May-09 0:01 
AnswerRe: How to move a drawn ball by Threading? Pin
Douglas Troy23-May-09 7:03
Douglas Troy23-May-09 7:03 
QuestionPrerequisites Pin
Ashwani Dhiman22-May-09 23:46
Ashwani Dhiman22-May-09 23:46 
QuestionRe: Prerequisites Pin
harold aptroot22-May-09 23:56
harold aptroot22-May-09 23:56 

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.