Using Contools - love it - but can't figure out how to make the console as big as possible without covering the Start & Taskbar at the bottom of Windows. I don't want to Maximize the display, just almost maximize! This code is close, but on my two computers it doesn't quite go to the right or to the bottom, by about 10% of the screen.
Code:
#REGISTER NONE #INCLUDE "C:\PBCC40\Winapi\WIN32API.INC" 'should be newest one! #INCLUDE "c:\GFXTOOLS\GFXT_Pro.INC" 'upgrade to version 2 #INCLUDE "c:\CONTOOLS\CT_Pro.INC" 'update to version 2.50 %MAXMENUBUFFER=100 FUNCTION WINMAIN(BYVAL hCurInstance AS LONG, BYVAL hPrevInstance AS LONG, _ BYVAL lpszCmdLine AS ASCIIZ PTR, BYVAL nCmdShow AS LONG) EXPORT AS LONG ConsoleToolsAuthorize <<<your code>>> 'Authorization code lResult& = InitConsoleTools(hCurInstance, %MAXMENUBUFFER, 2, 3, 0, 0) ' 2 screen save buffers ; 3=using new GFX-Pro lResult& = Console80x(30) ' sets 80 col, 30 row console (helps size on other systems) '-----------should completely maximizes window to fill desktop (less toolbar)from initial values dum!=ConsoleInfo(%DESKTOP_HEIGHT)/ConsoleInfo(%WINDOW_HEIGHT) dum!=FIX(dum!*ConsoleInfo(%BUFFER_HEIGHT)) dum2!=ConsoleInfo(%DESKTOP_WIDTH)/ConsoleInfo(%WINDOW_WIDTH) dum2!=FIX(dum2!*ConsoleInfo(%BUFFER_WIDTH)) lResult& = ConsoleControl(%BUFFER_HEIGHT,dum!) lResult& = ConsoleControl(%CONSOLE_BOTTOM,dum!) lResult& = ConsoleControl(%BUFFER_width,dum2!) lResult& = ConsoleControl(%CONSOLE_right,dum2!) lResult& = ConsoleMove(0,0) 'left side of screen at pixel 0, SLEEP 25 PRINT PRINT " press any key to exit" WAITKEY$ END FUNCTION
Comment