How to change the Console display in VB.NET

The CLI is a straightforward command interface and you can change the look of you command line according to your specifications.
  • 7157

While Visual Studio .NET is the most popular method of developing .NET applications, the Framework offers command-line interface. In addition, And the .NET Framework SDK provides additional command-line tools. A command line interface is a means used for interacting with files by typing commands to perform specific tasks.

The CLI is a straightforward command interface. You type commands on a single line, and the commands are executed when you press the Enter key. A command-line interpreter then receives, parses, and executes the requested user command. The command-line interpreter may be run in a text terminal or in a terminal emulator window as a remote shell client such as PuTTY. The CLI provides command help and command completion, and it also provides Emacs-style keyboard sequences that allow you to move around on a command line and scroll through a buffer that contains recently executed commands.

While at the time of creating console application in Visual basic, you can change the look of you command line according to your specifications, look at the example's given below:

Example1

Module Module1
    Sub Main()
        Console.Title = "User Define Console"
        Console.BackgroundColor = ConsoleColor.Red
        Console.ForegroundColor = ConsoleColor.White
        Console.WindowHeight = Console.LargestWindowHeight - 15
        Console.WindowWidth = Console.LargestWindowWidth - 15
        Console.Clear()
        Console.WriteLine("While Visual Studio .NET is the most popular method of developing .NET applications.")
        Console.ReadLine()
    End Sub
End Module

Output

example1.jpg

Example2

Module Module1
    Sub Main()
        Console.Title = "User Define Console"
        Console.BackgroundColor = ConsoleColor.Yellow
        Console.ForegroundColor = ConsoleColor.Black
        Console.WindowHeight = Console.LargestWindowHeight - 15
        Console.WindowWidth = Console.LargestWindowWidth - 15
        Console.Clear()
        Console.WriteLine("While Visual Studio .NET is the most popular method of developing .NET applications.")
        Console.ReadLine()
    End Sub
End Module

Output

example2.jpg

Categories

More Articles

© 2013 dotNetheaven. All rights reserved.