fb:porticula NoPaste
Windows Console Window
Uploader: | St_W |
Datum/Zeit: | 26.11.2013 11:24:44 |
#Include "windows.bi"
Dim As HANDLE hOut
Dim As CONSOLE_SCREEN_BUFFER_INFO SBInfo
Dim As COORD NewSBSize
Dim As Integer Status
hOut = GetStdHandle(STD_OUTPUT_HANDLE)
GetConsoleScreenBufferInfo(hOut, @SBInfo)
Print "Screen Buffer Size : "; SBInfo.dwSize.X; " x "; SBInfo.dwSize.Y
NewSBSize.X = SBInfo.srWindow.Right-SBInfo.srWindow.Left+1
NewSBSize.Y = SBInfo.srWindow.Bottom-SBInfo.srWindow.Top+1
Sleep
Status = SetConsoleScreenBufferSize(hOut, NewSBSize)
if (Status = 0) Then
Status = GetLastError()
Print "SetConsoleScreenBufferSize() failed! Reason : "; Status
Sleep
End Status
EndIf
GetConsoleScreenBufferInfo(hOut, @SBInfo)
Print "Screen Buffer Size : "; SBInfo.dwSize.X; " x "; SBInfo.dwSize.Y
Sleep
SBInfo.srWindow.Left = 0
SBInfo.srWindow.Top = 0
SBInfo.srWindow.Bottom = 50-1
SBInfo.srWindow.Right = 80-1
NewSBSize.X = SBInfo.srWindow.Right-SBInfo.srWindow.Left+1
NewSBSize.Y = SBInfo.srWindow.Bottom-SBInfo.srWindow.Top+1
SetConsoleScreenBufferSize(hOut, NewSBSize)
if (Status = 0) Then
Status = GetLastError()
Print "SetConsoleScreenBufferSize() failed! Reason : "; Status
Sleep
End Status
EndIf
Status = SetConsoleWindowInfo(hOut, TRUE, @SBInfo.srWindow)
if (Status = 0) Then
Status = GetLastError()
Print "SetConsoleWindowInfo() failed! Reason : "; Status
Sleep
End Status
EndIf
GetConsoleScreenBufferInfo(hOut, @SBInfo)
Print "Screen Buffer Size : "; SBInfo.dwSize.X; " x "; SBInfo.dwSize.Y
Sleep