473,387 Members | 1,624 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,387 software developers and data experts.

How to show the console contents in a Window Form?

Does anybody has any idea how to listen to the console and show its contents in a Windows Form Application?
Dec 16 '08 #1
7 1931
Plater
7,872 Expert 4TB
Whos console, yours or another processes?
Dec 16 '08 #2
My console!! in the same project.
Dec 16 '08 #3
Plater
7,872 Expert 4TB
Hmm well, everything outputed to your console is put there by you youself in code, so I would say just change your console.writeline's to myTextbox.AppendText()s ?
Dec 16 '08 #4
nukefusion
221 Expert 100+
You could also attach a Listener object to intercept output.
That would save you trawling through your code and adding additional lines to output the data somewhere else.
Dec 16 '08 #5
Frinavale
9,735 Expert Mod 8TB
@nukefusion
Seems a bit over kill because it's his own code that is generating the output in the first place....I would recommend trying Plater's suggestion first before attempting the Listener Object implementation.
Dec 16 '08 #6
nukefusion
221 Expert 100+
@Frinavale
Agreed, if it's only a few lines scattered around a few classes then Platers suggestion would work fine and would definitely be the way to go.

I was thinking more in terms of if it's hundreds of lines of code all over the place. In those circumstances a listener would be much quicker to implement than trawling through existing code - it's fairly simple to setup requiring only a handful of lines of code and only needs to be plugged in once. It's also got the added benefit that once it's set up, it's there. You don't need to remember to add those additional lines in the future either, making it easier to maintain.
I guess it really depends on what you want to do with it long term.
Dec 16 '08 #7
Plater
7,872 Expert 4TB
edit: oops wrong thread
Dec 16 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Chris Maloof | last post by:
Hello, Does anyone know how I can read the ASCII text from a console window (from another application) in WinXP? It doesn't sound like a major operation, but although I can find the window via...
1
by: Mullin Yu | last post by:
But, I want is that I can have a Main app that will start a new process or kill one particular or all process. The process will open a console exe. But, I don't want the user to close the console...
8
by: Alison | last post by:
Hi, Al I am trying to design a user interface which provides both menus and toolbars for some users to click on whatever they want to do, at the same time, I would like to have a console window...
0
by: Lucian Wischik | last post by:
I'm using ToolTip.Show(x,y,..) to show my balloon-style tooltip at a specified coordinate. Most of the time it works fine and the "tip" of the balloon points exactly to my specified (x,y)...
1
by: elbertlev | last post by:
Hi! I have an application where images (jpeg) have to be annotated by an operator. I use PIL like: import Image im = Image.open(Path) im.show() raw_input(Path + ':') .....
3
by: Todd Jaspers | last post by:
Hey guys, I am writing a web app using C#/ASP/.NET/Whatever... I'd like to have a window pop-up with some text. Basically, I'm trying to find out what the MessageBox.Show or the...
10
by: Stephany Young | last post by:
When one uses the System.Diagnostics.Process.Start method to launch a common or garden Console application, one can set the WindowStyle property of the StartInfo object to ProcessWindowStyle.Hidden...
1
by: mirandacascade | last post by:
1) Module1 has the following delcaration: Public g_frmZZZ as Form Public g_txtForm2 as Variant 2) app has two forms: form1 and form2 3) a command button on form1 opens form2; it also has...
13
by: =?Utf-8?B?c29sZXI=?= | last post by:
need to write a simple app with console output and file i/o to be distributed to other machines. Is it possbile in c# without .net overhead, not sure if all machines Xp have .net installed. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.