Console App Clear Screen

EGGMAN

Newcomer
Joined
May 22, 2003
Messages
5
Location
Spencer, MA
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!
 
try with this ;)


Console.Write("Hello \r");

with \r you will remain in the same row

by tiz
 
Back
Top