Console.Clear Method clears the console buffer and corresponding console window of display information.
Imports System
Class Sample
Protected Shared origRow As Integer
Protected Shared origCol As Integer
Protected Shared Sub WriteAt(s As String, x As Integer, y As Integer)
Try
Console.SetCursorPosition(origCol + x, origRow + y)
Console.Write(s)
Catch e As ArgumentOutOfRangeException
Console.Clear()
Console.WriteLine(e.Message)
End Try
End Sub
Public Shared Sub Main()
Console.Clear()
origRow = Console.CursorTop
origCol = Console.CursorLeft
WriteAt("All done!", 0, 6)
End Sub
End Class
Related examples in the same category