Vincent Parrett 830 Posted Monday at 07:34 AM Hi All This is a port of the dotnet/c# Console class, which makes easy to do things like set colors, move the cursor etc. https://github.com/VSoftTechnologies/VSoft.System.Console Currently only Windows supported, however it's architected so that other platforms can be added - happy to take pull requests for that if anyone wants to add other platforms. Supports Delphi XE3 or later (compiles with XE2 but encoding issues stop it from working correctly). 2 1 Share this post Link to post
Der schöne Günther 334 Posted Monday at 08:05 AM For me, the demo code bails out with an exception on SetWindowSize(..). For some reason, GetLargestConsoleWindowSize returns (240, 54) which then causes your function to raise an EArgumentOutOfRangeException. Which seems to be matching the .NET counterpart. So all is fine, and my computer is acting up. Weird. Share this post Link to post
Vincent Parrett 830 Posted Monday at 08:23 AM Oh that's weird. What version of delphi are you using? Share this post Link to post
limelect 51 Posted Monday at 08:28 AM (edited) Same as above D10.2.3 window 7 Edited Monday at 08:30 AM by limelect Share this post Link to post
Vincent Parrett 830 Posted Monday at 08:30 AM The valid sizes will depend on your screen resolution. on my machine I get LargestWindowHeight 85 LargestWindowWidth 320 So that call to SetWindowSize is out of bounds for your machine. I guess I should make the demo use more conservative values. 1 Share this post Link to post
limelect 51 Posted Monday at 08:40 AM (edited) New one // Console.SetWindowSize(200,60); Console.SetWindowSize(150,48); Now Ok, but stack does nothing What is supposed to do? turned endlessly while true do Sleep(200); Edited Monday at 08:44 AM by limelect Share this post Link to post
limelect 51 Posted Monday at 08:45 AM (edited) That it? contr C Edited Monday at 08:46 AM by limelect Share this post Link to post
Vincent Parrett 830 Posted Monday at 09:10 AM The demo is very basic - haven't had time to produce anything more extensive. Share this post Link to post