Click here to Skip to main content
15,886,519 members
Home / Discussions / C#
   

C#

 
AnswerRe: streaming text on panels (sheets) Pin
Luc Pattyn4-May-12 16:54
sitebuilderLuc Pattyn4-May-12 16:54 
Questiongridview row not triggering Pin
Dhyanga4-May-12 9:38
Dhyanga4-May-12 9:38 
AnswerRe: gridview row not triggering Pin
Eddy Vluggen6-May-12 1:12
professionalEddy Vluggen6-May-12 1:12 
QuestionHow to create existing chat control as a user control in C# Pin
ChandrakanthGaddam4-May-12 1:15
ChandrakanthGaddam4-May-12 1:15 
AnswerRe: How to create existing chat control as a user control in C# Pin
Ravi Bhavnani4-May-12 3:38
professionalRavi Bhavnani4-May-12 3:38 
NewsRe: How to create existing chat control as a user control in C# Pin
Eddy Vluggen4-May-12 5:36
professionalEddy Vluggen4-May-12 5:36 
AnswerRe: How to create existing chat control as a user control in C# Pin
Eddy Vluggen4-May-12 5:39
professionalEddy Vluggen4-May-12 5:39 
QuestionRedirect output from a unmanaged dll to a winform textbox Pin
andreas043-May-12 23:07
andreas043-May-12 23:07 
Hello,

i have the following code, which redirects the
output from a unmanged dll into a file:

[DllImport("Kernel32.dll", SetLastError = true) ]
public static extern int SetStdHandle(int device, IntPtr handle);


FileStream filestream;
StreamWriter streamwriter;

void Redirect()
{
int status;
IntPtr handle;
filestream = new FileStream("logfile.txt", FileMode.Create);
streamwriter = new StreamWriter(filestream);
streamwriter.AutoFlush = true;
Console.SetOut(streamwriter);
Console.SetError(streamwriter);

handle = filestream.Handle;
status = SetStdHandle(-11, handle); // set stdout
// Check status as needed
status = SetStdHandle(-12, handle); // set stderr
// Check status as needed
}

But I want to write the output to a winform-control
(textbox).

How can I do that?

Regards
Andreas
AnswerRe: Redirect output from a unmanaged dll to a winform textbox Pin
Richard MacCutchan3-May-12 23:39
mveRichard MacCutchan3-May-12 23:39 
AnswerRe: Redirect output from a unmanaged dll to a winform textbox Pin
BobJanova3-May-12 23:45
BobJanova3-May-12 23:45 
GeneralRe: Redirect output from a unmanaged dll to a winform textbox Pin
andreas047-May-12 9:52
andreas047-May-12 9:52 
QuestionHow do According to xml export excel? Pin
Apocalypse Now3-May-12 21:51
Apocalypse Now3-May-12 21:51 
AnswerRe: How do According to xml export excel? Pin
Richard MacCutchan3-May-12 23:37
mveRichard MacCutchan3-May-12 23:37 
GeneralRe: How do According to xml export excel? Pin
Apocalypse Now3-May-12 23:48
Apocalypse Now3-May-12 23:48 
QuestionMVC Config File / MAPPING Pin
dataminers3-May-12 11:25
dataminers3-May-12 11:25 
GeneralUnderstanding various types of WCF bindings Pin
Vasudev Choudhary3-May-12 20:03
Vasudev Choudhary3-May-12 20:03 
AnswerRe: MVC Config File / MAPPING Pin
Richard MacCutchan3-May-12 23:36
mveRichard MacCutchan3-May-12 23:36 
Questioncritical rigion Pin
ammar24423-May-12 6:04
ammar24423-May-12 6:04 
AnswerRe: critical rigion Pin
Wes Aday3-May-12 6:13
professionalWes Aday3-May-12 6:13 
AnswerRe: critical rigion Pin
Bernhard Hiller3-May-12 21:23
Bernhard Hiller3-May-12 21:23 
AnswerRe: critical rigion Pin
Abhinav S3-May-12 22:00
Abhinav S3-May-12 22:00 
QuestionStreaming the response of type byte[] Pin
NarVish2-May-12 22:51
NarVish2-May-12 22:51 
QuestionRe: Streaming the response of type byte[] Pin
Richard MacCutchan2-May-12 22:53
mveRichard MacCutchan2-May-12 22:53 
AnswerRe: Streaming the response of type byte[] Pin
NarVish2-May-12 23:31
NarVish2-May-12 23:31 
GeneralRe: Streaming the response of type byte[] Pin
Richard MacCutchan3-May-12 0:10
mveRichard MacCutchan3-May-12 0:10 

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.