473,395 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how do I stdout to a form instead of console

Some people tryed to help in my previous post. But I don't quite have it.
What I want to do is send stdout to something on a form textbox, panel,
listbox -- something. I want to write to a form the same way you would
write to a console using console.write(), except I want to send that output
to something on a form. Is this possible?

Dec 11 '07 #1
4 3586
Well I guess you could have a multi-line textbox on a form and then set it's
text property to the text you want to write to the console. So you would
first set up a string with the formated data that you would of sent to the
console and then set the textbox's text property to that string. There are
other techniques to 'write' on a form or picture box which involve getting
their graphics device and using its 'DrawString' method.
--
Terry
"DougE" wrote:
Some people tryed to help in my previous post. But I don't quite have it.
What I want to do is send stdout to something on a form textbox, panel,
listbox -- something. I want to write to a form the same way you would
write to a console using console.write(), except I want to send that output
to something on a form. Is this possible?
Dec 11 '07 #2
I don't think so. It has to do with creating either a stringwriter or
streamwriter object, I don't know which, then redirecting the standard output
from the console somehow with a memeber of the console class and
writeline(ing) it to either the stringwriter or streamwriter object which you
send to the form. Sounds easy, huh? Then why is it so hard to find a [SANE]
example?

"Terry" wrote:
Well I guess you could have a multi-line textbox on a form and then set it's
text property to the text you want to write to the console. So you would
first set up a string with the formated data that you would of sent to the
console and then set the textbox's text property to that string. There are
other techniques to 'write' on a form or picture box which involve getting
their graphics device and using its 'DrawString' method.
--
Terry
"DougE" wrote:
Some people tryed to help in my previous post. But I don't quite have it.
What I want to do is send stdout to something on a form textbox, panel,
listbox -- something. I want to write to a form the same way you would
write to a console using console.write(), except I want to send that output
to something on a form. Is this possible?
Dec 11 '07 #3


"DougE" wrote:
I don't think so. It has to do with creating either a stringwriter or
streamwriter object, I don't know which, then redirecting the standard output
from the console somehow with a memeber of the console class and
writeline(ing) it to either the stringwriter or streamwriter object which you
send to the form. Sounds easy, huh? Then why is it so hard to find a [SANE]
example?
This sounds like maybe you are trying to run some external program via a
Process.Start(), and capture that processes output for your form rather than
to the standard console. Do I understand correctly? If so, then when you
create your Process instance, you need to follow something like the following
link:
http://msdn2.microsoft.com/en-us/lib...ardoutput.aspx.

Once you read the output, you need to stuff the output into a control as
Terry suggested, or using my favorite, which is a listbox control.

If I'm misunderstanding your goal, please clarify how I'm mistaken.


Dec 12 '07 #4
You cannot use stdout in VB.Net.

You have at least to use a from C derived language.

However to get your result is a full docked textbox with the right
properties enough.

Cor

Dec 12 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
4
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
0
by: lickspittle | last post by:
Hi, I have Python embedded with my other code, and when my other code opens a console and redirects stdout, stdin and stderr to it, then calls PyRun_InteractiveLoop, it immediately returns with...
2
by: Thomas W. Brown | last post by:
I have setup Console redirection within my Console app (via Console.SetOut and Console.SetErrror) to route console WriteLine calls to a logfile. This works just fine with one exception... I use...
2
by: Nadav | last post by:
Hi, Introduction: *************** I am trying to redirect stdout to a RichEdit control, this is done by initiating a StringWriter, associated it with a StringBuilder and setting the...
9
by: Santtu Nyrhinen | last post by:
Hi, Let say that I have a function like void writeHello() { printf("Hello"); } Now I need to make an automated test fot that function. The test function returns 1 for successful and 0 for...
2
by: Massi | last post by:
Hi everyone! I'm writing a python script which uses a C-written dll. I call the functions in the dll using ctypes, but I don't know how to catch the output of the "printf" which the C functions...
4
by: ElderGeek | last post by:
Hi, all. I am coding in C on Linux, and using an external library provided by others. This library generates a batch of error/warning messages to stdout, which I do not want to see. Before...
6
by: not_a_commie | last post by:
I changed the stdout in my C# app using Console.SetOut. It works fine for all my Console.Out.Write calls and with log4net. However, I don't see any output from native dlls that write to stdout....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.