473,406 Members | 2,549 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,406 software developers and data experts.

Console.Clear Method (System)

Using Microsoft Visual C# 2005 Express [2.0.50215]
With XP Pro

Console.Clear();
used as per the the sample at
http://msdn2.microsoft.com/library/2...us,vs.80).aspx

is throwing an exception :
System.IO.IOException was unhandled
Message="The handle is invalid.\r\n"
Source="mscorlib"
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)

at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean&
succeeded)

at System.Console.GetBufferInfo()

at System.Console.Clear()

at TestClear.Program.Main(String[] args) in
C:\VCSharp\kwb_testing\TestClear\TestClear\Program .cs:line 34

at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)

at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)

at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()

at System.Threading.ThreadHelper.ThreadStart_Context( Object state)

at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()

... Can anyone throw some light on this ??
Regards
Kerry
Nov 17 '05 #1
1 7772

"Kerry Brown" <kwbrown@home> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
Using Microsoft Visual C# 2005 Express [2.0.50215]
With XP Pro

Console.Clear();
used as per the the sample at
http://msdn2.microsoft.com/library/2...us,vs.80).aspx

is throwing an exception :
System.IO.IOException was unhandled
Message="The handle is invalid.\r\n"
Source="mscorlib"
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)

at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean&
succeeded)

at System.Console.GetBufferInfo()

at System.Console.Clear()

at TestClear.Program.Main(String[] args) in
C:\VCSharp\kwb_testing\TestClear\TestClear\Program .cs:line 34

at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)

at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)

at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()

at System.Threading.ThreadHelper.ThreadStart_Context( Object state)

at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()

... Can anyone throw some light on this ??
Regards
Kerry

Please post Beta2 questions to the VS2005 Beta forum
http://forums.microsoft.com/msdn/ , these forums are meant to support
customers for the Visual Studio 2005 Beta 2 release and are replacing the
private whidbey NG's.

That said , the sample you are refering to works for me, I guess you run a
modified version.

Willy.

Nov 17 '05 #2

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

Similar topics

19
by: Dave | last post by:
Hi, I have done some research, trying to Clear The Screen in java code. The first option was the obv: system.out.print("\n\n\n\n\n\n\n\n\n\n\n\n"); then i heard about this method:...
4
by: jabailo | last post by:
This is driving me crazy. I finally got the Remoting sample chat application working almost. When I run the chat client in VS.NET it goes into an endless loop -- that's because I assume that...
5
by: Publicjoe | last post by:
I am working on a little app which uses colour in the console window. I have created a class to extend the console functionality but the ClearScreen method does not work correctly. I am enclosing a...
1
by: James | last post by:
Hi everyone, I'm having a bit of trouble with the System.Console.Clear() Method in my manual C# console applications. They work, but when you open the project the next day, they don't. It says...
11
by: sebplays | last post by:
Hi, I seach function for clear screen in VB.Net for console application. Please help me
0
by: merco | last post by:
hi, i'm trying to write a console application using vbnet2005. It runs ok in a command prompt. Now, i have to use this console application via telnet (using w2003 server as telnet server) but i...
7
by: Just Me | last post by:
I am writing a small windows applicationa and I am writing console.writeline data to the console window. But i wanted to clear the area before writing to the window. I found the console.clear...
3
by: Sheikko | last post by:
Sincerly is a little bit complicated to explain to you what I have in my mind, but I will try: Above all the problem is the type of data that I want to passe between these two applications. The...
4
by: Dinsdale | last post by:
I am writing a small console application that runs fine unless I am re- directing the output to a file (i.e. c:\ app.exe >>output.txt) . I have determined that the issue is caused by the...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
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...
0
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...

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.