VB.NET, C#, PowerShellを使用しているエンジニアのためのサイト。
基本的な使用方法から開発で役立つTipsまで幅広く取り扱っています。
コンソールの背景色を設定するには、ForegroundColorプロパティを使用します。
Sub Main() Console.ForegroundColor = ConsoleColor.Black Console.WriteLine("ForegroundColor color is Black") Console.ForegroundColor = ConsoleColor.DarkBlue Console.WriteLine("ForegroundColor color is DarkBlue") Console.ForegroundColor = ConsoleColor.DarkGreen Console.WriteLine("ForegroundColor color is DarkGreen") Console.ForegroundColor = ConsoleColor.DarkYellow Console.WriteLine("ForegroundColor color is DarkYellow") Console.ForegroundColor = ConsoleColor.DarkCyan Console.WriteLine("ForegroundColor color is DarkCyan") Console.ForegroundColor = ConsoleColor.DarkRed Console.WriteLine("ForegroundColor color is DarkRed") Console.ReadLine() End Sub