Home All Groups Group Topic Archive Search About

Process redirectStandardOutput into a textBox?

Author
14 Feb 2007 11:28 PM
Ole
Hi,

Is it possible to bind the output from  process to a textBox?

Thanks,
Ole

Author
15 Feb 2007 6:42 AM
RobinS
You could put the output into a property in a class, and bind *that* to a
textbox. That's one idea.

Robin S.
------------------------
Show quote
"Ole" <o**@blabla.com> wrote in message
news:OWdrQ$IUHHA.4832@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> Is it possible to bind the output from  process to a textBox?
>
> Thanks,
> Ole
>
Author
16 Feb 2007 2:18 PM
Ciaran O''Donnell
You cant bind a stream to a textbox but there is an event on the Process
object that fires when texts is written to the output stream. You can handle
this event and use textbox.Invoke to update the textbox text. You have to use
invoke as the event fires on a background thread.


Show quote
"Ole" wrote:

> Hi,
>
> Is it possible to bind the output from  process to a textBox?
>
> Thanks,
> Ole
>
>
>
Author
6 Mar 2007 11:01 AM
Ole
Thanks,

I've now tried to use the event from the output stream, but it seems like
the process doesn't output anything until it has finished. Under normal
conditions the commandline program outputs some information every 3'rd
second, but as written I only got the event when the command line program
exits??? Is that a normal behaviour from a DOS program?

Thanks,
Ole


Show quote
"Ciaran O''Donnell" <CiaranODonn***@discussions.microsoft.com> wrote in
message news:FCC92F78-A834-4256-8BBE-6EDA0494BC50@microsoft.com...
> You cant bind a stream to a textbox but there is an event on the Process
> object that fires when texts is written to the output stream. You can
> handle
> this event and use textbox.Invoke to update the textbox text. You have to
> use
> invoke as the event fires on a background thread.
>
>
> --
> Ciaran O''Donnell
> http://wannabedeveloper.spaces.live.com
>
>
> "Ole" wrote:
>
>> Hi,
>>
>> Is it possible to bind the output from  process to a textBox?
>>
>> Thanks,
>> Ole
>>
>>
>>

AddThis Social Bookmark Button