Ciao,
try this one:
uses "Console" Console_SetScreenBufferSize(40, 128) Console_ShowWindow(%CONSOLE_SW_MAXIMIZE) WaitKey
Hi,
I'm looking for a method to get a console window with
40 lines x 128 columns
I've found Console_SetScreenBufferSize(xSize, ySise) but it seems to resize
the buffer, not the window ( scroll bars appears around the window ).
It is then possible to increase size of the window with the mouse.
But what I wish is to achieve this only by program. The program I'm writing
is intended to start on conditions driven by external stimulies, an display informations that can't
enter in a 24x80 console.
Thanks for help.
Last edited by dco045; 06-01-2018 at 11:14.
Ciao,
try this one:
uses "Console" Console_SetScreenBufferSize(40, 128) Console_ShowWindow(%CONSOLE_SW_MAXIMIZE) WaitKey
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Inside \thinBasic\SampleScripts\Console\ there are some example script that can help.
In any case just ask if you need something
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Hi,
After having the window sized as I want/need, I wish another control over my console windows.
The opened windows are always at the upper/left corner of my first screen (my machine have two screens).
I would wish to choose the destination screen 1 or 2, and the position of the window in that screen.
The screen and position should ideally set by variables in the script.
IE: debug windows in left screen, alert windows centerd in right screen.
Let me know if it' possible
Dany
hello dco045
I think it should be possible, here's someone that did something similar to what your after but it's in FreeBasic but maybe it will give you ideas on how to do it in ThinBasic https://www.freebasic.net/forum/view...241467#p241467
Honestly I use many screens at work but never thought to develop some thinBasic functionalities related to multi screens functionalities.
I have to study Windows SDK how it manage it, if it is just a width/height extension or what.
As a dirty solution you can get Console handle (the Windows ID that identify the any window) and use it to manage pixel width/height and window location using UI module.
Here an example:
I will let you know if I find something on multi screens handling, it can be a nice to have.uses "Console" uses "UI" Long ConsoleHandle long DeskWidth long DeskHeight Console_SetScreenBufferSize(40, 128) 'Console_ShowWindow(%CONSOLE_SW_MAXIMIZE) '---Get size of the virtual desktop DESKTOP GET CLIENT TO DeskWidth, DeskHeight Printl "Virtual desktop size is:", DeskWidth, "width", DeskHeight, "height" ConsoleHandle = Console_GetHandle printl "ConsoleHandle:", ConsoleHandle, hex$(ConsoleHandle) dialog set Size ConsoleHandle, 640, 480 dialog set loc ConsoleHandle, 100, 100 WaitKey
Last edited by ErosOlmi; 22-01-2018 at 21:48.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
You can get Virtual desktop size using this:
More info here:uses "Console" uses "UI" Long ConsoleHandle long DeskWidth long DeskHeight Console_SetScreenBufferSize(40, 128) 'Console_ShowWindow(%CONSOLE_SW_MAXIMIZE) '---Get size of the virtual desktop DESKTOP GET CLIENT TO DeskWidth, DeskHeight Printl "Virtual desktop size is:", DeskWidth, "width", DeskHeight, "height" ConsoleHandle = Console_GetHandle printl "ConsoleHandle:", ConsoleHandle, hex$(ConsoleHandle) dialog set Size ConsoleHandle, 640, 480 dialog set loc ConsoleHandle, 100, 100 WaitKey
Virtual screen https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
Some other info: https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
I will add some functionality in next thinBasic release in order to have info on how many monitors, which is the primary one and for each have the resolution.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Dear Dany,
attached here a Bundled Executable with new functionalities working on multiple display monitor.
Can you please run it and give feedback on what you see.
Actually I do not have multiple monitor at home so my screen data is like the attached one.
If you have more than one monitor you should get the number of monitor and for each of them resolution and working area relative to primary monitor
Thanks a lot
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Bookmarks