TC 9.51 does not save the size and position of its window
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 4
- Joined: 2017-11-27, 05:02 UTC
- Location: Russia, Samara City
TC 9.51 does not save the size and position of its window
On one of the computers with Windows Server 2012 R2 Total Commander 9.51 64-bit does not save its window size and position. In the file wincmd.ini after executing the command "Save position" the same window coordinates are always spelled out:
[1920x1080 (8x16)]
maximized=0
x=0
y=13
dx=1920
dy=876
The same problem occurs in Windows 10 when the system font scale is set to other than 100%.
However, on the other Windows Server 2012 R2 computer, the size is saved:
[1920x1080 (8x16)]
maximized=0
x=451
y=0
dx=1469
dy=1050
It is strange that in the second case dx=1469, not 1920, although the TC window is aligned with the right edge of the screen, which operates in 1920x1080 mode.
The need to re-adjust the size and position of the window after each TC start is annoying. Could you figure out why saving doesn't work and fix the bug?
[1920x1080 (8x16)]
maximized=0
x=0
y=13
dx=1920
dy=876
The same problem occurs in Windows 10 when the system font scale is set to other than 100%.
However, on the other Windows Server 2012 R2 computer, the size is saved:
[1920x1080 (8x16)]
maximized=0
x=451
y=0
dx=1469
dy=1050
It is strange that in the second case dx=1469, not 1920, although the TC window is aligned with the right edge of the screen, which operates in 1920x1080 mode.
The need to re-adjust the size and position of the window after each TC start is annoying. Could you figure out why saving doesn't work and fix the bug?
Last edited by Vladislav Vasilyev on 2021-01-06, 07:56 UTC, edited 1 time in total.
Re: TC 9.51 does not restore the size and position of its window
Maybe you have the wincmd.ini parameter ResolutionSpecific set to zero on the first computer - then the settings are saved in the [AllResolutions] section.
dx is not the coordinate of the right corner it is the width of TC. So screen width - x = dx (1920 - 451 = 1469 ).It is strange that in the second case dx=1469, not 1920
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
-
- Junior Member
- Posts: 4
- Joined: 2017-11-27, 05:02 UTC
- Location: Russia, Samara City
On a computer where the size and position of the Total Commander window is not saved, the "ResolutionSpecific" parameter is absent in the wincmd.ini file, the coordinates in the [AllResolutions] section are absent. In the [1920x1080 (8x16)] section only the "maximized" and "Tabstops" parameters are saved, other coordinates always remain constant:
[1920x1080 (8x16)]
maximized=0
x=455
y=4
dx=1467
dy=800
[1920x1080 (8x16)]
maximized=0
x=455
y=4
dx=1467
dy=800
Last edited by Vladislav Vasilyev on 2021-01-06, 07:56 UTC, edited 1 time in total.
-
- Junior Member
- Posts: 4
- Joined: 2017-11-27, 05:02 UTC
- Location: Russia, Samara City
I wrote the previous post while connected to Windows Server 2012 R2 via RDP.
I have an idea: could it be that Total Commander behaves so strangely due to its remote desktop mode? Connected to the server console using the latest version of TeamViewer - the window coordinates were saved. Just when I was happy that my hunch was confirmed, I closed TeamViewer connection and reconnected via RDP - oh, my goodness! - window coordinates are now saved in the RDP session as well.
I don't get it! How can that be?
I have an idea: could it be that Total Commander behaves so strangely due to its remote desktop mode? Connected to the server console using the latest version of TeamViewer - the window coordinates were saved. Just when I was happy that my hunch was confirmed, I closed TeamViewer connection and reconnected via RDP - oh, my goodness! - window coordinates are now saved in the RDP session as well.
I don't get it! How can that be?
Re:
One possible cause is that you used the windows snapping feature (dragging the TC-window to the left/right side/edge of the screen) and than resized the TC-window while snapping to one of the screen borders was still active.
TC has some problems to get the actual window position in conjunction with window snapping.
Regards
Holger
Make our planet great again
- ghisler(Author)
- Site Admin
- Posts: 50383
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: TC 9.51 does not save the size and position of its window
When using window snapping, the functions asking for window position (GetWindowPlacement) return the coordinates of the not snapped window, not those of the snapped window. I guess that they are the size stored in the ini file.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 4
- Joined: 2017-11-27, 05:02 UTC
- Location: Russia, Samara City
Re: TC 9.51 does not save the size and position of its window
Thank you, you were right. Snap to Side was the culprit. To turn it off, open "Control Panel/All Control Panel items/Special Features/Mouse Simplification" and check "Disable automatic ordering of windows when they are moved to screen boundaries" (Russian to English translation). Or, if through the registry:
[HKEY_CURRENT_USER\Control Panel\Desktop]
"WindowArrangementActive"="0"
Problem solved!
[HKEY_CURRENT_USER\Control Panel\Desktop]
"WindowArrangementActive"="0"
Problem solved!