EGGMAN Posted July 30, 2003 Posted July 30, 2003 I am trying to write a simple console application that clears the screen. The standard ESC [2J does not work. What do I need to set to have it use ASCII codes? Do samples of simple console applictions exist anywhere? Module Module1 Dim X As String Sub Main() Console.WriteLine("HELLO!") Console.Write(Convert.ToChar(91)) Console.Write(Convert.ToChar(50)) Console.Write(Convert.ToChar(74)) Console.WriteLine("HELLO AGAIN!") Console.Read() End Sub End Module This code returns: HELLO! [2JHELLO AGAIN! Quote
TIz Posted July 30, 2003 Posted July 30, 2003 try with this ;) Console.Write("Hello \r"); with \r you will remain in the same row by tiz Quote
Administrators PlausiblyDamp Posted July 30, 2003 Administrators Posted July 30, 2003 http://ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/enu_kbwin32sdk/win32sdk/99261.htm gives you a sample in C, could be converted to C# or VB I suppose Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
nibsy Posted July 31, 2003 Posted July 31, 2003 This thread may be of some use; http://www.xtremedotnettalk.com/showthread.php?s=&threadid=49753&highlight=console :) Quote
EGGMAN Posted July 31, 2003 Author Posted July 31, 2003 Thank you very much... that link was exactly what I was looking for! Quote
JumpyNET Posted March 18, 2006 Posted March 18, 2006 One way. This is simple and does nothing else than clears the screen: http://support.microsoft.com/default.aspx/kb/319257/EN-US/ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.