473,808 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Making System.Console. WriteLine() text outputs visible in a GUI program ?

In general the program is GUI based.

However sometimes I would like to wirte some text lines to Console as if it is
a Console program.

When I write a System.ConsoleW riteLine() statement this is accepted without error (during build and
runtime). Unfortunately no Cosole pops up at runtime and showing the text.

I assume I have to enable the Console resp. make it visible and let it popup when necessary.

How do I do this (from a GUI program) ?`

Ken

May 25 '07 #1
2 3272
On May 25, 9:11 am, kenn...@mercede s.com (Ken Williams) wrote:
In general the program is GUI based.

However sometimes I would like to wirte some text lines to Console as if it is
a Console program.
To *which* console though - that's the issue.
When I write a System.ConsoleW riteLine() statement this is accepted
without error (during build and
runtime). Unfortunately no Cosole pops up at runtime and showing the text.

I assume I have to enable the Console resp. make it visible and let it popup
when necessary.

How do I do this (from a GUI program) ?
Rather than bring up a "real" console, I suggest you use a textbox or
something similar. Redirect Console.Out and Console.Error to
TextWriters which write to the textbox.

Jon

May 25 '07 #2
u can see the text in the window of menubar - debug - window-outputs.

i havn't find ways on how to start the console.

"Ken Williams" <ke*****@merced es.comдÈëÏûÏ¢
news:46******** *************** @newsspool3.arc or-online.net...
In general the program is GUI based.

However sometimes I would like to wirte some text lines to Console as if
it is
a Console program.

When I write a System.ConsoleW riteLine() statement this is accepted
without error (during build and
runtime). Unfortunately no Cosole pops up at runtime and showing the text.

I assume I have to enable the Console resp. make it visible and let it
popup when necessary.

How do I do this (from a GUI program) ?`

Ken

May 25 '07 #3

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

Similar topics

1
17142
by: Martin Honnen | last post by:
With both .NET 1.0 and 1.1 I have found the following strange behaviour where System.Xml.XmlDocument.LoadXml doesn't throw an error when parsing a text node with a character reference to an invalid characters like &#x1;. Using the CreateTextNode method I create a text node containing "\u0001a" (C# string literal notation). As far as I understand the DOM allows that and an implementation is not required to throw an error. When OuterXml is...
4
3856
by: William McIlroy | last post by:
Array Bounds Exception inside system.xml.dll. Test data is a dozen GB (available for the asking on CD). Source code follows. Call into system.xml.dll happens at the while statement.. using System using System.Xml using System.Collections // This program reads an ASCII file of XML elements // The output is a list of unique NODE TYPEs // For example, <head> produces head in the output // There is no validation of the XML
12
3793
by: newsgroupie | last post by:
Hi Newsgroupies, I'm writing a Web Forms program using C# (VS.NET 2003) and trying to monitor it whilst running using "System.Console.WriteLine(<params>)" but can't for the life of me find where it outputs too. Am I thick or just unlucky? Please help!
5
11264
by: Barry Mossman | last post by:
Hi, can I detect whether my class is running within the context of a Console application, vs say a WinForm's application ? also does anyone know whether the compiler or runtime is smart enough to avoid the overhead of writing to the console if it is not visible, eg I am running inside a WinForm application. thanks
10
1872
by: Jeff Grills | last post by:
I am an experienced C++ programmer with over 12 years of development, and I think I know C++ quite well. I'm changing jobs at the moment, and I have about a month between leaving my last job and starting my new one. In that time, I have decided to learn C#. I picked up the book, "Programming C# (4th Edition)" recently and have read most of it. I've written about 1,500 lines of C# now, and I've run into the first really ugly thing I...
20
1487
by: djc | last post by:
I get this *intermittently* on a utility I am working on. I don't know whats going on but here are a few points about it: - using VS 2005, running on xp sp2 - program uses multiple threadpool threads - only happens when built with the 'release' configuration (no debug flag, compiler optimizations in effect) - no problems in debug config here is the error: Unhandled Exception: System.AccessViolationException: Attempted to read or write...
1
2444
by: =?Utf-8?B?QnJpYW4gQ29iYg==?= | last post by:
This code is contained in one source file in VS 2005 project: using System; using System.Collections.Generic; using System.Text; using System.Reflection; namespace ReflectionTest { internal class x
1
4054
by: myburt | last post by:
I'm working on very simple lessons to learn c #. Can anyone give an example of how to make a virtual object such as these Thank You. namespace critter_menu { class Program {
8
13344
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi, I created a web service and hosted it in Windows Services. It is working fine. Now I am trying to implement the X509 certificates for message layer security. But it is throwing the following exception: An unhandled exception of type 'System.ServiceModel.Security.SecurityNegotiationException' occurred in mscorlib.dll
0
9600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10631
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10374
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10374
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10114
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.