Terminal control/Dimensions: Difference between revisions

Added Visual Basic solution (with a bit detailed output)
(Added Axe)
(Added Visual Basic solution (with a bit detailed output))
Line 526:
set HEIGHT=`tput lines`
echo "The terminal is $WIDTH characters wide and has $HEIGHT lines."</lang>
 
=={{header|Visual Basic}}==
{{trans|C#}}
<lang vb>Module Module1
 
Sub Main()
Dim bufferHeight = Console.BufferHeight
Dim bufferWidth = Console.BufferWidth
Dim windowHeight = Console.WindowHeight
Dim windowWidth = Console.WindowWidth
 
Console.Write("Buffer Height: ")
Console.WriteLine(bufferHeight)
Console.Write("Buffer Width: ")
Console.WriteLine(bufferWidth)
Console.Write("Window Height: ")
Console.WriteLine(windowHeight)
Console.Write("Window Width: ")
Console.WriteLine(windowWidth)
End Sub
 
End Module</lang>
{{Out}}
I put the built application in Desktop.
<pre>\Desktop>ConsoleApplication1
Buffer Height: 300
Buffer Width: 80
Window Height: 25
Window Width: 80</pre>
Re-sizing the Console:
<pre>\Desktop>ConsoleApplication1
Buffer Height: 300
Buffer Width: 80
Window Height: 14
Window Width: 49
 
\Desktop></pre>
 
=={{header|XPL0}}==
535

edits