Buchempfehlung
Visual Basic 6 Kochbuch
Visual Basic 6 Kochbuch
Viele praktische Tipps zum Programmieren mit Visual Basic 6, die sich oft auch auf FB übertragen lassen. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

Windows Console Window

Uploader:RedakteurSt_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