473,657 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pause console output

Does anyone know if its possible to pause the console output if my console
app tries to write data past the current command prompt buffer?

In other words, behave much like the 'more' command, in that it stops
outputting and waits for the user to hit space to display the next pages
worth, or enter for the next line?

Thanks in advance for any suggestions.

Dan.
Nov 16 '05 #1
2 7056
Use Console.ReadLin e() to pause. You'll have to put in the logic to pause
every 25 lines or so if you have more lines of output.

- Noah Coad -
Microsoft MVP

"Dan Williams" <da**********@n ewcross-nursing.com> wrote in message
news:8l******** *************** *****@40tude.ne t...
Does anyone know if its possible to pause the console output if my console
app tries to write data past the current command prompt buffer?

In other words, behave much like the 'more' command, in that it stops
outputting and waits for the user to hit space to display the next pages
worth, or enter for the next line?

Thanks in advance for any suggestions.

Dan.

Nov 16 '05 #2
On Thu, 1 Apr 2004 15:28:10 -0600, Noah Coad [MVP .NET/C#] wrote:
Use Console.ReadLin e() to pause. You'll have to put in the logic to pause
every 25 lines or so if you have more lines of output.

- Noah Coad -
Microsoft MVP

OK, cheers. I'll give it a go.

Is there anyway to get the buffer size of the console/command window, then
i can use that in my logic?
--

Thanks in advance

Dan Williams
Nov 16 '05 #3

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

Similar topics

1
5377
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 application (VB.NET) will start a process, redirect its stdout and capture that process' output, displaying it in a window. I've written a component for this, and a test application for the component. It allows me to specify a command to execute,...
5
4132
by: Brian.Steele | last post by:
Greetings everyone. See http://www.spiceisle.com/cgi-bin/slideshow/slideshow.cgi?dir=brian/personal/2005/uk_trip/images&type=jpg The "Pause" button works in IE, but not in Firefox. Any ideas why? If you have any other ideas on how the javascript can be improved, please let me know.
8
36442
by: Wim | last post by:
My GUI application starts a process (a console program) when the user hits Play. I would like to add an option to pause that process. The code I've added to detect if the user hit pause/unpause seems to work. But I have no clue how to pause/suspend the process. As far as I can see the Process class doesn't offer anything for this. So it's probably the thread the process is running on that should be suspended or put to sleep. But just...
1
547
by: Dan Williams | last post by:
Does anyone know if its possible to pause the console output if my console app tries to write data past the current command prompt buffer? In other words, behave much like the 'more' command, in that it stops outputting and waits for the user to hit space to display the next pages worth, or enter for the next line? Thanks in advance for any suggestions. Dan.
6
6620
by: Mark Broadbent | last post by:
Firstly I am not after a programatic solution (e.g. Console.ReadLine() or a Loop construct). I am trying to find an option in the IDE to pause on exit. For instance with the SharpDevelop IDE there is a checkbox to do this, but I cant find it in VS2003 -but I will be surprised if it doesnt have one. .....So where is it?? Thanks,
5
4795
by: Aaron | last post by:
In a console based application, I'd like to pause for a keystroke. I thought Console.Read would do the trick, but after it didn't I found this on the MSDN description of the function: Console.Read This method will not return until the read operation is terminated; for example, by the user pressing the enter key.
6
45643
by: kai | last post by:
Hi, When I use Console.WriteLine("Hello") in my code, it displays DOS screen so fast, how do I pause the Console screen? Thanks Kai
0
1401
by: Arik | last post by:
Hi, I would like to disable the 'Pause/Break' key in a console application. Normally, pressing the 'Pause' key halts the application's execution and may lead to undesirable processing gaps in my system. I tried to 'listen' for input key presses using Console.ReadKey(), but it turns out that it doesn't recognize the 'Pause' key (among other keys).
3
1359
by: markclinn | last post by:
I have a device in the field that I access by the stream method. I open the Stream and do the following: 1. stream.write a character to the device. 2. stream.read the information from the device. The problem is that when I am debugging and step through the code there is a long enough pause that I recieve the entire string. If I just run it, I only get the 1st character. I have attached the code below. Public Class Form1 ...
6
4048
by: Peted | last post by:
Hi wondering what is the best way to do this Need a user to click a button, that sends 3 or 4 string based commands via a TCP/ip socket link I can connect to the ip device no problems, am using indy sockets, and can send information ok
0
8407
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8319
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
8739
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...
0
8612
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...
0
7347
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
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();...
0
4171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2739
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
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.