Konsolenfenster
Verfasst: 10.09.2019 12:47
Seit längerem stört mich die mickrige Größe des Konsolenfensters auf einem 4k-Monitor. Lässt sich das Konsolenfenster rein optisch irgendwie vergrößern (z.B.auf die doppelte Größe)?
Code: Alles auswählen
EnableExplicit
ImportC "msvcrt.lib"
system(cmd.p-ascii)
EndImport
If OpenConsole("Meine Konsole")
system("mode 200,60")
Input()
CloseConsole()
EndIf
Code: Alles auswählen
EnableExplicit
Define a
If OpenConsole("Meine Konsole")
keybd_event_(#VK_CONTROL, #Null, #Null, #Null)
For a=1 To 20
mouse_event_(#MOUSEEVENTF_WHEEL, 0, 0, #WHEEL_DELTA, 0)
Next
keybd_event_(#VK_CONTROL, #Null, #KEYEVENTF_KEYUP, #Null)
Input()
CloseConsole()
EndIf
PureBasic - Linker error hat geschrieben:POLINK: error: Unresolved external symbol 'GetNumberOfConsoleFonts'.
POLINK: error: Unresolved external symbol 'SetConsoleFont'.
POLINK: fatal error: 2 unresolved external(s).
Code: Alles auswählen
EnableExplicit
Import "kernel32.Lib"
SetCurrentConsoleFontEx.i(hOut.i,bMaximumWindow.b,*lpConsoleCurrentFontEx)
EndImport
Structure CONSOLE_FONT_INFOEX
cbSize.l
nFont.l
dwFontSize.COORD
FontFamily.l
FontWeight.l
FaceName.u[#LF_FACESIZE]
EndStructure
Global cfi.CONSOLE_FONT_INFOEX
OpenConsole()
With cfi.CONSOLE_FONT_INFOEX
\cbSize = SizeOf(CONSOLE_FONT_INFOEX)
\dwFontSize\X = 0
\dwFontSize\Y = 48
\FontWeight = #FW_BOLD
EndWith
PokeS(@cfi\FaceName, "Lucida Console", -1, #PB_Unicode)
SetCurrentConsoleFontEx(GetStdHandle_(#STD_OUTPUT_HANDLE), 1, @cfi)
PrintN("The quick brown fox jumped over the lazy dog.")
Input()
CloseLibrary(0)
End