# cls in TakeCommand screen does not clear full screen

#### knudvaneeden

Hi,

Has anybody encountered problems with doing a 'cls' and then not clearing the whole TakeCommand screen?
E.g. the lower lines (below line 69) are not cleared.

===

Steps to reproduce:

2. Maximize that TakeCommand window (to full screen on a 30 inch monitor)
3. Open any TAB
4. E.g. make sure TCC opens and runs
5. The maximum window in which TCC runs seems to be restricted to about 69 or 70 lines vertically
(=black window)
6. But sometimes lines below 69 lines are also written to
(=lower blue part)
7. Result: Then if you do a 'cls' then only the first 69 lines are cleared, and the lines below that are not cleared and stay visible.
8. But expected was: that if you do a 'cls' then the whole full screen is cleared, not only the first 69 lines.

---

The workarounds are e.g.

1. Changing the window from maximized to a non-maximized size (e.g. by clicking on the windows [] and then decreasing the window size by using the mouse)
or similar
2. Manually pressing repeatedly <ENTER> so that the cursor moves to the lower part of the 69 lines. Then doing a 'cls' with the cursor in that lower position does also clear the whole screen.

---

This has occurred at least from Tcmd v11, v12, v13 en v14.
I have never seen this resolved by any version.

===

Tried:

1. I tried e.g. again in the latest version to change the window settings (e.g. Buffer Rows, custom window size (height and Y), restarted TakeCommand after that.
2. Checked tcmd.ini in the <user>\AppData\Local\ directory for any relevant parameter
3. It might be a driver issue has been suggested, but I am not sure about this
4. I expect some (maybe hard coded?) window height setting somewhere. Maybe more users have encountered the same issue.

---

See also screenshot where you clearly see that tcc runs in a smaller (black) window, while
the whole (blue) screen is much bigger.
Sometimes lines are also written in the lower blue part which can thus not be cleared using 'cls'.

Thanks

#### Attachments

• 354 KB Views: 4

#### Charles Dye

##### Super Moderator
Are you saying that part of the visible area of the console window is not being cleared, or are you talking about part of the scrollback buffer which is not visible?

CLS by itself is only supposed to clear the visible window. If you want to empty the entire buffer, that's what the /C option is for.

#### Jay Sage

Hi,

Has anybody encountered problems with doing a 'cls' and then not clearing the whole TakeCommand screen?
E.g. the lower lines (below line 69) are not cleared.

I cannot reproduce your problem because my screen is not big enough to display that many lines. However, I can report that every so often CLS fails to clear some of the text at the bottom of the tab. This seems to be some kind of glitch -- not at all repeatable. My workaround is to minimize and then restore the TCMD window.

-- Jay

#### rconn

Windows issue, not TCMD. You need to change your default console font size so that you can display more lines in the TCMD tab window.

Windows limits the console window size to the number of lines it can display in a maximized console window, which is determined by the font size. You can change the default font size either by starting a console window and adjusting the properties, or editing the console registry settings.

#### TimButterfield

I have an 80x66 TCC tab size and have experienced partial clearing where text remains in the lower lines (bottom 1/3 to 1/2 of the window) and only the upper lines are cleared. I may have mentioned it before. But, I only rarely see it and have not been able to repeat it intentionally.

#### knudvaneeden

Are you saying that part of the visible area of the console window is not being cleared, or are you talking about part of the scrollback buffer which is not visible?

CLS by itself is only supposed to clear the visible window. If you want to empty the entire buffer, that's what the /C option is for.
Yes, it is about the visible area of the console window.

But

CLS /C

is something I will try next time (and e.g. creating a shorthand alias for it), as it is an easier and quicker workaround.

The price to pay is loosing the history content of the scrollback buffer, but that buffer is usually something one does not frequently need.

Thanks

#### knudvaneeden

Yes, it is about the visible area of the console window.

But

CLS /C

is something I will try next time (and e.g. creating a shorthand alias for it), as it is an easier and quicker workaround.

The price to pay is loosing the history content of the scrollback buffer, but that buffer is usually something one does not frequently need.

Thanks
I tried

CLS /C

but I can confirm that it does not resolve the issue.

#### knudvaneeden

Windows issue, not TCMD. You need to change your default console font size so that you can display more lines in the TCMD tab window.

Windows limits the console window size to the number of lines it can display in a maximized console window, which is determined by the font size. You can change the default font size either by starting a console window and adjusting the properties, or editing the console registry settings.
My current font size is 9.

Changing the font size to even smaller would make it barely visible unfortunately.

Thanks.

#### knudvaneeden

My current font size is 9.

Changing the font size to even smaller would make it barely visible unfortunately.

Thanks.
Actually you do not have to make the font size smaller (e.g. 5 instead of 9), but bigger (e.g. 12 instead of 9)

But that would give some interesting workaround for this issue.

You could create a 'cls' alias similar to the following, which I assume would work OK (not tested or created yet, not sure if all this commands are possible out of the box)

1. Set your Font size equal to some large value

E.g.

Set Font Size = 12

2. Do a normal

CLS

Set Font Size = 9

4. Put this steps in an alias

alias yourCLS= ...

#### Attachments

• 403.2 KB Views: 1

#### knudvaneeden

No
Actually you do not have to make the font size smaller (e.g. 5 instead of 9), but bigger (e.g. 12 instead of 9)

But that would give some interesting workaround for this issue.

You could create a 'cls' alias similar to the following, which I assume would work OK (not tested or created yet, not sure if all this commands are possible out of the box)

1. Set your Font size equal to some large value

E.g.

Set Font Size = 12

2. Do a normal

CLS

Set Font Size = 9

4. Put this steps in an alias

alias yourCLS= ...
No, as far as I can tell at this moment, there are no commands to set the FONT SIZE
in an alias.

#### knudvaneeden

It can probably be reproduced on any screen size.

E.g. in attachment a 17 inch screen and font size = 6
you see then that the bottom lines are not reachable.

Note:
An easy way to change the font size is to use the mouse 'middle' button.
That can increase or decrease the font size.

#### Attachments

• 114.4 KB Views: 1

#### knudvaneeden

It can probably be reproduced on any screen size.

E.g. in attachment a 17 inch screen and font size = 6
you see then that the bottom lines are not reachable.

Note:
An easy way to change the font size is to use the mouse 'middle' button.
That can increase or decrease the font size.
Actually <CTRL> + mouse 'middle' button.
That can increase or decrease the font size.

#### Charles Dye

##### Super Moderator
Yes, it is about the visible area of the console window.
This is in a Take Command tab window, not a standalone console? I think I missed that point.

If CLS isn't clearing the whole visible area of a tab window, I would tend to suspect the video driver. (I had similar issues once, long ago, when I was using an antique video card. The problem disappeared when I upgraded to a better one.)

You might try updating the drivers for the video card. If that doesn't help, you might try playing with the "hardware acceleration" slider on the "Troubleshoot" tab of the display driver's properties dialog; but if that helps, the cure may be worse than the disease. Reducing hardware acceleration can make screen writes painfully slow in all programs.

#### knudvaneeden

This is in a Take Command tab window, not a standalone console? I think I missed that point.

If CLS isn't clearing the whole visible area of a tab window, I would tend to suspect the video driver. (I had similar issues once, long ago, when I was using an antique video card. The problem disappeared when I upgraded to a better one.)

You might try updating the drivers for the video card. If that doesn't help, you might try playing with the "hardware acceleration" slider on the "Troubleshoot" tab of the display driver's properties dialog; but if that helps, the cure may be worse than the disease. Reducing hardware acceleration can make screen writes painfully slow in all programs.
I have seen the issue occurring now on at least 3 different monitors (of different brands), so it is not likely that a driver upgrade will resolve the issue.

As also other users reported the same behavior.

(I think if could set the font size via an alias then that would be a possible good workaround, but setting the font size using a JPSoft command seems not possible, as far as I know now).

Thanks,

#### Charles Dye

##### Super Moderator
I have seen the issue occurring now on at least 3 different monitors (of different brands), so it is not likely that a driver upgrade will resolve the issue.

As also other users reported the same behavior.

(I think if could set the font size via an alias then that would be a possible good workaround, but setting the font size using a JPSoft command seems not possible, as far as I know now).
I mean specifically the video card, not the monitor.

If you want to change console fonts from within TCC, you might try Vincent's 4CONSOLE plugin: ftp://lucky.syr.edu/4plugins/

#### knudvaneeden

I mean specifically the video card, not the monitor.

If you want to change console fonts from within TCC, you might try Vincent's 4CONSOLE plugin: ftp://lucky.syr.edu/4plugins/
I tried it, but I got this error:

ftp://lucky.syr.edu/4plugins/

2. That gave 2 files

4console.txt
4console.dll

3. I typed the commands suggested in the 4console.txt file

plugin /U *
plugin /L [path\to\]4console.dll
4. But I got, even after redownloading and unzipping and giving the full filename to the DLL the error:

plugin /L 4console.dll

TCC: (Sys) 4console.dll is not a valid Win32 application.

5. I think there is something wrong with the DLL.
This is run on Microsoft Windows Ultimate 64 bits
JPSoft TakeCommand / tcc v4.03.59

Thanks

#### knudvaneeden

I tried it, but I got this error:

ftp://lucky.syr.edu/4plugins/

2. That gave 2 files

4console.txt
4console.dll

3. I typed the commands suggested in the 4console.txt file

plugin /U *
plugin /L [path\to\]4console.dll
4. But I got, even after redownloading and unzipping and giving the full filename to the DLL the error:

plugin /L 4console.dll

TCC: (Sys) 4console.dll is not a valid Win32 application.

5. I think there is something wrong with the DLL.
This is run on Microsoft Windows Ultimate 64 bits
JPSoft TakeCommand / tcc v4.03.59

Thanks
I think I found it, there is also an 'x64' subdirectory.

ftp://lucky.syr.edu/4plugins/X64/4console64.zip

I will try that now.

#### knudvaneeden

Yes, that works using e.g.

plugin /U *

plugin /L 4console64.dll
I do currently not think it works (that is it will not successfully change the font size, as it probably will change nothing):

1. I typed the command to load the DLL

plugin /L 4console64.dll

2. Then I checked which functions were loaded

plugin /F
4CONSOLE: @BOOL @BUFCHAR @FONTH @FONTW @ICONS

3. Then I tried to change the width of the font

echo %@FONTW[9]

That returned:
10

But nothing changed regarding the font width.

4. Then I tried to change the height of the font (e.g. choosing 20, 10, 15, 13, ...)

echo %@FONTH[20]
0

%@FONTH[10]
0

echo %@FONTH[15]
0

echo %@FONTH[13]
0

But nothing changed thus regarding the font height.

#### knudvaneeden

I do currently not think it works (that is it will not successfully change the font size, as it probably will change nothing):
...

But nothing changed thus regarding the font height.
In general I am not sure if that changing the font size from the command line will work by design in JPSoft tcmd.exe tcc window.

Because there is also a JPSoft native FONT command.

According to the JPSoft help:
"Usage: This command is only available in Windows Vista and later, and will only affect stand-alone TCC console windows. (You can change the font in Take Command tab windows using Configure Take Command / Tabs.)"

So trying first in the TakeCommand TAB tcc window to be sure:

FONT /Y20

or similar

FONT /F"Terminal" /Y20

nothing changed regarding the font.

Even when starting a standalone tcc.exe, using 'start tcc.exe', and then typing the commands

FONT /Y30

and or to include the font name (which should be present)

FONT /F"Raster Fonts" /Y30

did not change the font at all.

Thanks

#### vefatica

The command in 4CONSOLE that you need is SETFONT.
Code:
v:\> which setfont
setfont is a plugin command (4CONSOLE)
v:\> help setfont
Syntax: SETFONT N
N = 0 to _NFONTS - 1

#### knudvaneeden

The command in 4CONSOLE that you need is SETFONT.
Code:
v:\> which setfont
setfont is a plugin command (4CONSOLE)
v:\> help setfont
Syntax: SETFONT N
N = 0 to _NFONTS - 1
Does it work for you when

1. Running tcmd.exe

2. Then running tcc.exe in a tab

3. Then typing the command

plugin /L 4console64.dll

4. Then typing the commands

>which setfont
setfont is a plugin command (4CONSOLE)

>SETFONT 15
SETFONT: Invalid font index: 15

>echo %_NFONTS
10

> SETFONT 1

> SETFONT 2

> SETFONT 3

> SETFONT 4

> SETFONT 5

> SETFONT 6

> SETFONT 7

> SETFONT 8

> SETFONT 9

> SETFONT 10
SETFONT: Invalid font index: 10

But it does not change the font thus in that TAB window (result: Nothing changes, still the same font).

Tested on Microsoft Windows 7 Ultimate 64 bits English version
JPSoft TakeCommand 14.03.59

Thanks

#### vefatica

I wouldn't expect it to work in TCMD. It sets the console font. Use TCMD's Options dialog to change the font in tabs. Use SETFONT to change the font in a stand-alone console.

#### vefatica

I wouldn't expect it to work in TCMD. It sets the console font. Use TCMD's Options dialog to change the font in tabs. Use SETFONT to change the font in a stand-alone console.
P.S. I suspect many things in 4CONSOLE either won't work in a tab or won't make any sense. It's meant for console windows.

#### rconn

My current font size is 9.

Changing the font size to even smaller would make it barely visible unfortunately.
No, I'm talking about changing the font size of the (invisible) console window, not of the Take Command window.

#### vefatica

Rex, what parameters do I give FONT to get the 8x12 raster font (in a console)? I tried and couldn't get it.

#### knudvaneeden

FYI

Here you see the issue on a 15 inch screen (see PDF attachment).

After a 'cls' the upper part is cleared,
but at the bottom are thus lines remaining which are not cleared.

#### Attachments

• 84.9 KB Views: 5