VB.Net by API/System/Console — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 12:51, 26 мая 2010
Содержание
Console.BackgroundColor
Module Module1
Sub Main()
Console.Title = "Custom Command Window"
Console.BackgroundColor = ConsoleColor.White
Console.ForegroundColor = ConsoleColor.DarkBlue
Console.WindowHeight = Console.LargestWindowHeight - 15
Console.WindowWidth = Console.LargestWindowWidth - 15
"Call a few methods to clear and pause the window.
Console.Clear()
End Sub
End Module
Console.Clear()
Module Module1
Sub Main()
Console.Title = "Custom Command Window"
Console.BackgroundColor = ConsoleColor.White
Console.ForegroundColor = ConsoleColor.DarkBlue
Console.WindowHeight = Console.LargestWindowHeight - 15
Console.WindowWidth = Console.LargestWindowWidth - 15
"Call a few methods to clear and pause the window.
Console.Clear()
End Sub
End Module
Console.ForegroundColor
Module Module1
Sub Main()
Console.Title = "Custom Command Window"
Console.BackgroundColor = ConsoleColor.White
Console.ForegroundColor = ConsoleColor.DarkBlue
Console.WindowHeight = Console.LargestWindowHeight - 15
Console.WindowWidth = Console.LargestWindowWidth - 15
"Call a few methods to clear and pause the window.
Console.Clear()
End Sub
End Module
Console.LargestWindowHeight
Module Module1
Sub Main()
Console.Title = "Custom Command Window"
Console.BackgroundColor = ConsoleColor.White
Console.ForegroundColor = ConsoleColor.DarkBlue
Console.WindowHeight = Console.LargestWindowHeight - 15
Console.WindowWidth = Console.LargestWindowWidth - 15
"Call a few methods to clear and pause the window.
Console.Clear()
End Sub
End Module
Console.ReadKey
Module Module1
Sub Main()
Dim strChar As String
Console.Write("Enter a character: ")
strChar = Console.ReadKey.KeyChar
"strChar = Console.ReadKey(True).KeyChar
Console.WriteLine()
Console.WriteLine("You just entered {0}.", strChar)
End Sub
End Module
Console.ReadKey.KeyChar
Module Module1
Sub Main()
Dim strChar As String
Console.Write("Enter a character: ")
strChar = Console.ReadKey.KeyChar
"strChar = Console.ReadKey(True).KeyChar
Console.WriteLine()
Console.WriteLine("You just entered {0}.", strChar)
End Sub
End Module
Console.ReadLine()
Module Module1
Sub Main()
Dim strMessage As String
Try
strMessage = Console.ReadLine()
Console.WriteLine("HELLO " + strMessage)
Catch ex As Exception
End Try
End Sub
End Module
Console.Title
Module Module1
Sub Main()
Console.Title = "Custom Command Window"
Console.BackgroundColor = ConsoleColor.White
Console.ForegroundColor = ConsoleColor.DarkBlue
Console.WindowHeight = Console.LargestWindowHeight - 15
Console.WindowWidth = Console.LargestWindowWidth - 15
"Call a few methods to clear and pause the window.
Console.Clear()
End Sub
End Module
Console.WindowHeight
Module Module1
Sub Main()
Console.Title = "Custom Command Window"
Console.BackgroundColor = ConsoleColor.White
Console.ForegroundColor = ConsoleColor.DarkBlue
Console.WindowHeight = Console.LargestWindowHeight - 15
Console.WindowWidth = Console.LargestWindowWidth - 15
"Call a few methods to clear and pause the window.
Console.Clear()
End Sub
End Module
Console.WindowWidth
Module Module1
Sub Main()
Console.Title = "Custom Command Window"
Console.BackgroundColor = ConsoleColor.White
Console.ForegroundColor = ConsoleColor.DarkBlue
Console.WindowHeight = Console.LargestWindowHeight - 15
Console.WindowWidth = Console.LargestWindowWidth - 15
"Call a few methods to clear and pause the window.
Console.Clear()
End Sub
End Module
Console.WriteLine
Imports System
public class MainClass
Shared Sub Main()
Dim twelve As Integer = 12
Dim five As Integer = 5
Console.WriteLine("{0} + {1} = {2}", _
twelve, five, twelve + five)
Console.WriteLine("{0} - {1} = {2}", _
twelve, five, twelve - five)
Console.WriteLine("{0} * {1} = {2}", _
twelve, five, twelve * five)
End Sub
End Class