Windows 11 console window

253 views
Skip to first unread message

Scott Coffey

unread,
May 9, 2025, 9:09:42 AMMay 9
to Harbour Users
I have an older Clipper/xHarbour app that I moved to a Windows 11 PC.  It seems that there is no longer a way to control the windows size via the program's shortcut.  It now shows up in a window that's larger than required/desired, and attempting to resize the window makes the text garbled.  Is there a way to overcome this?

TIA

cod...@outlook.com

unread,
May 9, 2025, 11:13:02 AMMay 9
to Harbour Users

José M. C. Quintas

unread,
May 9, 2025, 12:20:23 PMMay 9
to harbou...@googlegroups.com

on source code:


SetMode(25,80)


Or the size you want.


José M. C. Quintas



Em 09/05/2025 10:09, Scott Coffey escreveu:
I have an older Clipper/xHarbour app that I moved to a Windows 11 PC.  It seems that there is no longer a way to control the windows size via the program's shortcut.  It now shows up in a window that's larger than required/desired, and attempting to resize the window makes the text garbled.  Is there a way to overcome this?

TIA
--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/0cc5c9b9-9364-4679-a615-2b53b0c279a0n%40googlegroups.com.

AW

unread,
May 30, 2025, 5:56:48 AMMay 30
to Harbour Users
Windows 11 default setting prefers Windows Console wc.exe instead of cmd.exe.
And with wc.exe SetMode(25,80) no longer works.

I use a workaround inspired from following blog: 

"How to force a .bat to run in a legacy screen environment of cmd in Windows 11 instead the new Windows Terminal"
https://medium.com/@jsimian3525/how-to-force-a-bat-1990922cdf13


I start my harbour exe from a bat-file with following lines at beginning:

set id=%random%
title %id%
tasklist.exe /v /fo csv /FI "ImageName eq cmd.exe" | findstr "%id%"
if %errorlevel% == 1 start conhost.exe "%~f0" & GOTO :EOF
Reply all
Reply to author
Forward
0 new messages