Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc
1.3.3 dev 10
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
1.3.3 dev 10
downloads
https://uvnc.eu/download/133/UltraVNC_1 ... _Setup.exe
https://uvnc.eu/download/133/UltraVNC_1 ... _Setup.exe
https://uvnc.eu/download/133/UltraVnc_133_dev10.zip
1.3.3 dev 10
*Maxviewers
*multimouse option
*zlib fix
*winpe fix
*Possible crash fix ( minidump analyse)
*Zstd 1.5.0
*cleanup old code
*rdpmode fix
https://uvnc.eu/download/133/UltraVNC_1 ... _Setup.exe
https://uvnc.eu/download/133/UltraVNC_1 ... _Setup.exe
https://uvnc.eu/download/133/UltraVnc_133_dev10.zip
1.3.3 dev 10
*Maxviewers
*multimouse option
*zlib fix
*winpe fix
*Possible crash fix ( minidump analyse)
*Zstd 1.5.0
*cleanup old code
*rdpmode fix
Re: 1.3.3 dev 10
I'm testing UVNC 1.3.3 dev10 on WinPE x64 10.0.19041.1 (the most current PE release). As others have posted, only GUI apps can be seen remotely, not the all-important command terminal itself. Additionally, when multiple apps are open, an app that is not in the forefront can be seen but not accessed. The same failure to display CMD windows also occurs with TightVNC and has been posted in their forum. The problem does not appear to be on the VNC viewer side, since viewers from TightVNC, RealVNC, and TigerVNC I've tested also have the same issue. REG ADD HKCU\Console /v ForceV2 /t REG_DWORD /d 0 /f (values 0 and 1) do not fix the issues. FYI, your test version of Alt+Tab (009) does not work on the viewer side. Spawning another CMD window in WinPE also does not show on the viewer side.
Having a fully functional VNC is critical to my operations, and because the new Microsoft driver model for ethernet and RAID drivers requires the newer PE versions, I cannot use older PE versions to solve the VNC problem. As others have noted, PE x64 builds through 10.0.17134.1 work correctly.
Are there specific settings I need to change in the Ultravnc.ini file? If so, please post the working settings or required configuration changes. Thanks.
Having a fully functional VNC is critical to my operations, and because the new Microsoft driver model for ethernet and RAID drivers requires the newer PE versions, I cannot use older PE versions to solve the VNC problem. As others have noted, PE x64 builds through 10.0.17134.1 work correctly.
Are there specific settings I need to change in the Ultravnc.ini file? If so, please post the working settings or required configuration changes. Thanks.
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
Re: 1.3.3 dev 10
Retested winpe v 10.0.19041.1
ultravnc.ini only has the passwords, no other settings
No REG ADD HKCU\Console change
winvnc 1.3.3 dev 10 64bit
How do i test
I manual do
wpeUtil disablefirewall
winvnc.exe
Then i make a viewer connection.
If "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" exist we consider the OS as Winpe.
The following does the same as winvnc shoudl do.
Detect winpe and make running cmd visable
https://uvnc.eu/download/133/winpeTest.zip
ultravnc.ini only has the passwords, no other settings
No REG ADD HKCU\Console change
winvnc 1.3.3 dev 10 64bit
How do i test
I manual do
wpeUtil disablefirewall
winvnc.exe
Then i make a viewer connection.
If "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" exist we consider the OS as Winpe.
The following does the same as winvnc shoudl do.
Detect winpe and make running cmd visable
https://uvnc.eu/download/133/winpeTest.zip
Re: 1.3.3 dev 10
Thanks for your information, Rudy!
I tested again with the manual steps you use:
* UltraVNC.ini includes only the passwords
* Confirm WinPE version is 10.0.19041.1 in HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\WinPE
* No REG ADD HKCU\Console change
* wpeutil disablefirewall
* winvnc
CMD windows does not show in viewer; however, when I additionally run your winpetest.exe, then the CMD window becomes visible. Winpetest.exe also fixes the same issue for TightVNC server, so tell me what changes are being made to WinPE to fix the issue?
Thanks again for your prompt attention.
I tested again with the manual steps you use:
* UltraVNC.ini includes only the passwords
* Confirm WinPE version is 10.0.19041.1 in HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\WinPE
* No REG ADD HKCU\Console change
* wpeutil disablefirewall
* winvnc
CMD windows does not show in viewer; however, when I additionally run your winpetest.exe, then the CMD window becomes visible. Winpetest.exe also fixes the same issue for TightVNC server, so tell me what changes are being made to WinPE to fix the issue?
Thanks again for your prompt attention.
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
Re: 1.3.3 dev 10
Yes, this fix it for all vnc versions, it just disable some graphics setting for the cmd while still using V2 console.
It isn't a winPE change, winvnc monitor the cmd's and change that graphical setting for it.
I only don't understand why it does't work on your winpe when ultravnc run this code direct.
Are you sure you are not connecting to another version ?
Else just copy the dev10 version as winvnc2.exe, use taskmgr to kill winvnc and start winvnc2.
(I use FT to copy the new version with another name so i don't need to rebuild winpe each time.)
When winvnc detect port 5900 is used, it start winvnc on port 5901.
It isn't a winPE change, winvnc monitor the cmd's and change that graphical setting for it.
I only don't understand why it does't work on your winpe when ultravnc run this code direct.
Are you sure you are not connecting to another version ?
Else just copy the dev10 version as winvnc2.exe, use taskmgr to kill winvnc and start winvnc2.
(I use FT to copy the new version with another name so i don't need to rebuild winpe each time.)
When winvnc detect port 5900 is used, it start winvnc on port 5901.
Re: 1.3.3 dev 10
Thanks for the feedback. I used your winpetest.exe to workaround the issue, and I'm very grateful for your help.
Re: 1.3.3 dev 10
Hi Rudi - thanks for your work on this. I was able to get cmd windows to display using the winpetest.exe, however it does not work for Powershell windows. Do you think Powershell can be added ?
Re: 1.3.3 dev 10
Actually running the winpetest.exe + setting this reg key allows me to view cmd and Powershell windows.
REG ADD HKCU\Console /v ForceV2 /t REG_DWORD /d 1 /f
REG ADD HKCU\Console /v ForceV2 /t REG_DWORD /d 1 /f
Re: 1.3.3 dev 10
We are using 19041 WinPE as well and have had the before mentioned issues. I have implemented the 1.3.3 dev 10 version into our WinPE and have also implemented the HKCU\Console registry key.
Good things first, it works ok for us with just the both measures. As a side node maybe, one connection at a time behaves ok, if a second connection to the same host is established vnc is really slow and freezes. This can be healed by both sessions disconnecting and just one of them reconnecting. On our 1809 WinPE we have been establishing two or even more connections without any issue.
Furthermore there is still something not behaving as it should be. We load a PowerShell generated form on startup which allows us to define a computer name. It has 4 different pull down menus the name can be created from. The form itself is shown ok, however whenever a pull down menu is entered nothing is displayed of that pull down. When you know which area you have to click the right entry is selected, so the pull down is there but it is just not displaying. Is this also something that has to do with the overall 19041 issue or is this a more "finetuning" related topic.
Rudi, great work and thank you for being there for the community.
Good things first, it works ok for us with just the both measures. As a side node maybe, one connection at a time behaves ok, if a second connection to the same host is established vnc is really slow and freezes. This can be healed by both sessions disconnecting and just one of them reconnecting. On our 1809 WinPE we have been establishing two or even more connections without any issue.
Furthermore there is still something not behaving as it should be. We load a PowerShell generated form on startup which allows us to define a computer name. It has 4 different pull down menus the name can be created from. The form itself is shown ok, however whenever a pull down menu is entered nothing is displayed of that pull down. When you know which area you have to click the right entry is selected, so the pull down is there but it is just not displaying. Is this also something that has to do with the overall 19041 issue or is this a more "finetuning" related topic.
Rudi, great work and thank you for being there for the community.
-
- Posts: 1
- Joined: 2021-06-22 15:06
Re: 1.3.3 dev 10
Rudi,
Would you provide more detail about what WinPETest.exe changes? Would you mind sharing the source code for that utility, please?
Would you provide more detail about what WinPETest.exe changes? Would you mind sharing the source code for that utility, please?
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
On some PC´s with 4k and 2k Monitor, One 100% other 200% scaled. The Picture is very bad.
I compiled the viewer with
<dpiAware>true/PM</dpiAware>
-> PROCESS_PER_MONITOR_DPI_AWARE
if this option make problems (Manifest) , this can be set at runtime per window too
https://docs.microsoft.com/en-us/window ... iawareness
I compiled the viewer with
<dpiAware>true/PM</dpiAware>
-> PROCESS_PER_MONITOR_DPI_AWARE
if this option make problems (Manifest) , this can be set at runtime per window too
https://docs.microsoft.com/en-us/window ... iawareness
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
I checked the exe and see, the PER_MONITOR_DPI_AWARE was not compiled in exe
The only difference was a newer Windows SDK
libzstd in Github Code is on 10.0.19041.0, all other on 8.1
10.0.19041.0 was not in my VisualStudio, changed all to 10.0.18362.0
But now the Computer with the problem had an Windows Update to 21H1
and Now all versions of Ultravanc dev10 are working OK
The exe with SDK 10.0.18362.0 is working on Windows7 too
64bit viewer only compiled with different SDK (OneDrive)
https://1drv.ms/u/s!AkdsiVHAVCeBhjFMuxm ... T?e=y0KP77
The only difference was a newer Windows SDK
libzstd in Github Code is on 10.0.19041.0, all other on 8.1
10.0.19041.0 was not in my VisualStudio, changed all to 10.0.18362.0
But now the Computer with the problem had an Windows Update to 21H1
and Now all versions of Ultravanc dev10 are working OK
The exe with SDK 10.0.18362.0 is working on Windows7 too
64bit viewer only compiled with different SDK (OneDrive)
https://1drv.ms/u/s!AkdsiVHAVCeBhjFMuxm ... T?e=y0KP77
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
I add one Test Exe with DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2Thomas Levering wrote: https://1drv.ms/u/s!AkdsiVHAVCeBhjFMuxm ... T?e=y0KP77
(Windows 10, version 1703 and later)
No other Codes Changes.
The ClientConnection Window, is everytime 100% Scaled.
The GUI is Auto Scaled
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
has nobody tried this yet?
only testing if Rudi Buid this?
vncviewer.cpp
only testing if Rudi Buid this?
vncviewer.cpp
Code: Select all
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR szCmdLine, int iCmdShow)
{
HMODULE hUser32 = LoadLibrary(_T("user32.dll"));
HMODULE shcoreDLL = LoadLibrary("SHCORE.DLL");
/* For Vista, Win7 and Win8 */
typedef BOOL(*SetProcessDPIAwareFunc)();
SetProcessDPIAwareFunc setDPIAware = NULL;
/* Win8.1 and later */
typedef enum _Process_DPI_Awareness {
Process_DPI_Unaware = 0,
Process_System_DPI_Aware = 1,
Process_Per_Monitor_DPI_Aware = 2
} Process_DPI_Awareness;
typedef HRESULT(*SetProcessDpiAwarenessFunc) (Process_DPI_Awareness);
SetProcessDpiAwarenessFunc setDPIpiAwareness = NULL;
/*Windows 10, version 1703 and later*/
typedef HRESULT(*SetProcessDpiAwarenessContextFunc) (DPI_AWARENESS_CONTEXT);
SetProcessDpiAwarenessContextFunc setDPIpiAwarenessContext = NULL;
if (hUser32)
setDPIAware = (SetProcessDPIAwareFunc)GetProcAddress(hUser32, "SetProcessDPIAware");
setDPIpiAwarenessContext = (SetProcessDpiAwarenessContextFunc)GetProcAddress(hUser32, "SetProcessDpiAwarenessContext");
if (shcoreDLL) {
setDPIpiAwareness = (SetProcessDpiAwarenessFunc)GetProcAddress(shcoreDLL, "SetProcessDpiAwareness");
}
if (setDPIpiAwarenessContext) {
setDPIpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
}
// else if (setDPIpiAwareness) {
// setDPIpiAwareness(Process_Per_Monitor_DPI_Aware);
// }
else if (setDPIAware)
setDPIAware();
if (hUser32)
FreeLibrary(hUser32);
if (shcoreDLL)
FreeLibrary(shcoreDLL);
#ifdef CRASHRPT
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
I add here a 64bit viewer exe and source zip with changed Files.
https://1drv.ms/f/s!AkdsiVHAVCeBhjFMuxmAGxOAqLdT
1.
Enabled dpi aware per monitor v2 -> If you have a 4k Monitor and a FullHD @ 200% and 100%
2.
sizeMultimon
void ClientConnection::SizeWindow
Auto Set Only if need
3.
if Save Pos is Enabled: (Bug)
On Reconnect, Change Parameter, etc. Leave Window on Last Position
4.
toDo
case WM_DPICHANGED:
see /* */ in code
the scaling to 200% can be better. Simple make from 1 pixel 4 pixel would be better then now
https://1drv.ms/f/s!AkdsiVHAVCeBhjFMuxmAGxOAqLdT
1.
Enabled dpi aware per monitor v2 -> If you have a 4k Monitor and a FullHD @ 200% and 100%
2.
sizeMultimon
void ClientConnection::SizeWindow
Auto Set Only if need
3.
if Save Pos is Enabled: (Bug)
On Reconnect, Change Parameter, etc. Leave Window on Last Position
4.
toDo
case WM_DPICHANGED:
see /* */ in code
the scaling to 200% can be better. Simple make from 1 pixel 4 pixel would be better then now
- OldNESJunkie
- 20
- Posts: 32
- Joined: 2017-05-22 21:40
- Location: Music City USA
- Contact:
Re: 1.3.3 dev 10
Thomas,
I will try your viewer out today. Been meaning to test it, but things have been hectic lately. I will let you know how it goes. We have a lot of edge cases here at the office the normal viewer has issues with, hopefully your version resolves some of those.
EDIT: The link in your last post isn't working for me....
I will try your viewer out today. Been meaning to test it, but things have been hectic lately. I will let you know how it goes. We have a lot of edge cases here at the office the normal viewer has issues with, hopefully your version resolves some of those.
EDIT: The link in your last post isn't working for me....
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
The Links are the same. OneDrive Folder with all Files.
2nd Link Cut after ?
OneDrive GeoLock? I‘m from Germany
2nd Link Cut after ?
OneDrive GeoLock? I‘m from Germany
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
-
- 40
- Posts: 127
- Joined: 2014-12-31 22:10
Re: 1.3.3 dev 10
Had a look at "vncviewer 10.0.19041.0 SDK DPI per Monitor2 SavePosPatch.exe":
Guess I can't test the DPI-Awareness changes (only single-Monitor with 4k resolution and 150% scaling), but the SavePos=1 changes fixed the following two bugs (of v1.3.3-dev10/2021-05-16):
1) [with SavePos=1 & SaveSize=1] start viewer session, move viewer window, switch from window to fullscreen: if you switch back to window it will be placed to it's initial position of the session-start. -> Bug: window position is not saved pre switching to fullscreen- or not correctly restored post switching back to window-mode.
2) [with SavePos=1 & SaveSize=0] start viewer session, move viewer window, switch from window to fullscreen: if you switch back to window it will be placed to it's initial position of the session-start, window has scroll bars (horizontal and vertical) and does not show the complete remote screen anymore -> Bug: window position is not saved pre switching to fullscreen- or not correctly restored post switching back to window-mode. Window size changes on switch from fullscreen- to window-mode (-> scroll bars are shown). // Sidenote: scrollbars only appear if you move the window before switching to full screen!
and introduced a minor one:
3) [with SavePos=1 & SaveSize=0/1] start viewer session, move viewer window to bottem right of the screen, switch from window to fullscreen, minimize the fullscreen viewer, restore fullscreen viewer, switch from fullscreen to window: viewer window is now positioned in the top left of the monitor. -> Bug: window position should not be saved/stored if fullscreen-viewer gets minimized!? (not sure if that happens and if is the reason for the lost/forgotten window-position)
Perhaps this could be solved, too?
Guess I can't test the DPI-Awareness changes (only single-Monitor with 4k resolution and 150% scaling), but the SavePos=1 changes fixed the following two bugs (of v1.3.3-dev10/2021-05-16):
1) [with SavePos=1 & SaveSize=1] start viewer session, move viewer window, switch from window to fullscreen: if you switch back to window it will be placed to it's initial position of the session-start. -> Bug: window position is not saved pre switching to fullscreen- or not correctly restored post switching back to window-mode.
2) [with SavePos=1 & SaveSize=0] start viewer session, move viewer window, switch from window to fullscreen: if you switch back to window it will be placed to it's initial position of the session-start, window has scroll bars (horizontal and vertical) and does not show the complete remote screen anymore -> Bug: window position is not saved pre switching to fullscreen- or not correctly restored post switching back to window-mode. Window size changes on switch from fullscreen- to window-mode (-> scroll bars are shown). // Sidenote: scrollbars only appear if you move the window before switching to full screen!
and introduced a minor one:
3) [with SavePos=1 & SaveSize=0/1] start viewer session, move viewer window to bottem right of the screen, switch from window to fullscreen, minimize the fullscreen viewer, restore fullscreen viewer, switch from fullscreen to window: viewer window is now positioned in the top left of the monitor. -> Bug: window position should not be saved/stored if fullscreen-viewer gets minimized!? (not sure if that happens and if is the reason for the lost/forgotten window-position)
Perhaps this could be solved, too?
-
- 40
- Posts: 127
- Joined: 2014-12-31 22:10
Re: 1.3.3 dev 10
Addendum: Bug (1) is (only) fixed if the switch between window- and fullscreen-mode is initiated using double-click on the title-bar ... it is NOT fixed if "maximize" button (title bar: second button from the right) or shortcut CTRL+ALT+F12 is used.
-
- 40
- Posts: 127
- Joined: 2014-12-31 22:10
Re: 1.3.3 dev 10
I had a closer look at the three options to toggle between window- and fullscreen-mode:
a) double-click title bar
b) maximize-button (title bar: 2nd button from the right)
c) shortcut CTRL+ALT+F12
Test-procedure: start viewer session, move viewer window, switch from window- to fullscreen-mode with a) or b) or c)...use the same option (a/b/c) to switch back to window-mode.
Test-binary: vncviewer 10.0.19041.0 SDK DPI per Monitor2 SavePosPatch.exe (which - in my option, as written previously - behaves better than v1.3.3-dev10/2021-05-16)
Outcome:
SavePos=0 SaveSize=0:
double-click title bar -> lost position/window is placed top left on the screen
maximize-button (title bar, 2nd from the right) -> restores window position = GOOD
CTRL+ALT+F12 -> window is cut off & lost position/window is restored on initial position
SavePos=1 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button (title bar, 2nd from the right) -> lost position/window is restored on initial position
CTRL+ALT+F12 -> window is cut off & lost position/window is restored on initial position
SavePos=1 SaveSize=1:
double-click title bar -> restores window position = GOOD
maximize-button (title bar, 2nd from the right) -> lost position/window is restored on initial position
CTRL+ALT+F12 -> window is cut off & lost position/window is restored on initial position
window is cut off = window is suddenly smaller than it should be (content/remote-screen is cut off at the bottom and right-side: in my case 22 pixel on x-axis, 56 pixel on y-axis are missing -> the taskbar of remote screen is not visible anymore) and the window can't be resized (there are no scrollbars, but they would not be needed if the window was the right size)
I'm afraid that's not as easy as one might imagine - I would definitely save the current state before trying to improve it further!?
a) double-click title bar
b) maximize-button (title bar: 2nd button from the right)
c) shortcut CTRL+ALT+F12
Test-procedure: start viewer session, move viewer window, switch from window- to fullscreen-mode with a) or b) or c)...use the same option (a/b/c) to switch back to window-mode.
Test-binary: vncviewer 10.0.19041.0 SDK DPI per Monitor2 SavePosPatch.exe (which - in my option, as written previously - behaves better than v1.3.3-dev10/2021-05-16)
Outcome:
SavePos=0 SaveSize=0:
double-click title bar -> lost position/window is placed top left on the screen
maximize-button (title bar, 2nd from the right) -> restores window position = GOOD
CTRL+ALT+F12 -> window is cut off & lost position/window is restored on initial position
SavePos=1 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button (title bar, 2nd from the right) -> lost position/window is restored on initial position
CTRL+ALT+F12 -> window is cut off & lost position/window is restored on initial position
SavePos=1 SaveSize=1:
double-click title bar -> restores window position = GOOD
maximize-button (title bar, 2nd from the right) -> lost position/window is restored on initial position
CTRL+ALT+F12 -> window is cut off & lost position/window is restored on initial position
window is cut off = window is suddenly smaller than it should be (content/remote-screen is cut off at the bottom and right-side: in my case 22 pixel on x-axis, 56 pixel on y-axis are missing -> the taskbar of remote screen is not visible anymore) and the window can't be resized (there are no scrollbars, but they would not be needed if the window was the right size)
I'm afraid that's not as easy as one might imagine - I would definitely save the current state before trying to improve it further!?
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
@Skyfighter
files changed, same Link
change/remove some code
Test Test Test all options
files changed, same Link
change/remove some code
Test Test Test all options
-
- 40
- Posts: 127
- Joined: 2014-12-31 22:10
Re: 1.3.3 dev 10
@Thomas Levering
Yes, sir, will test & report ASAP (sorry, next weekend at the latest - work is eating my time )
Yes, sir, will test & report ASAP (sorry, next weekend at the latest - work is eating my time )
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
Update Files
One Code Line wrong
and
FullScreenTitleBar.cpp (caption to big)
Old
-MulDiv(10, 96, 72) at100%
-MulDiv(10, 192, 72) at200%
New
-MulDiv(12, dpi, 96)
to do:
calculation of border, (after dpi change)
if first Monitor is 4K/200% and other 2k/100%
on the other Monitor the Window is to big (a little black strip)
One Code Line wrong
and
FullScreenTitleBar.cpp (caption to big)
Code: Select all
case WM_DPICHANGED:
{
TitleBarThis->Font = CreateFont(-MulDiv(12, HIWORD(wParam), 96), 0, 0, 0, 0, FALSE, 0, 0, 0, 0, 0, 0, 0, "Arial");
//toDo Repaint
}
-MulDiv(10, 96, 72) at100%
-MulDiv(10, 192, 72) at200%
New
-MulDiv(12, dpi, 96)
to do:
calculation of border, (after dpi change)
if first Monitor is 4K/200% and other 2k/100%
on the other Monitor the Window is to big (a little black strip)
-
- 40
- Posts: 127
- Joined: 2014-12-31 22:10
Re: 1.3.3 dev 10
Cool, thats a big improvement! Thank you very much Thomas!
Test-binary: vncviewer.exe/2021-07-27 08:12:16
Outcome:
SavePos=0 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> lost position/window is placed in the middle of the screen
CTRL+ALT+F12 -> lost position/window is placed in the middle of the screen
SavePos=1 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> lost position/window is restored on initial position
CTRL+ALT+F12 -> lost position/window is restored on initial position
SavePos=1 SaveSize=1:
double-click title bar -> restores window position = GOOD
maximize-button -> lost position/window is restored on initial position
CTRL+ALT+F12 -> lost position/window is restored on initial position
If you mix the options: "double-click title bar" to enter fullscreen-mode and then use maximize-button or CTRL+ALT+F12 to switch back to window-mode: window-position is correctly restored! -> maximize-button & CTRL+ALT+F12 are missing a small piece of code?
In other words, switching to fullscreen-mode using
double-click title bar -> window position is saved/remembered
maximize-button & CTRL+ALT+F12 -> window position is NOT saved/remembered
And a directly related problem: If you are in fullscreen-mode and use the minimize-button (title bar, 3rd from the right) the window-position (of the fullscreen-viewer) should NOT be saved/NOT overwrite the last saved window position of the viewer (but that happens). ((Here you have the above mentioned missing code at the wrong place?))
Test-binary: vncviewer.exe/2021-07-27 08:12:16
Outcome:
SavePos=0 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> lost position/window is placed in the middle of the screen
CTRL+ALT+F12 -> lost position/window is placed in the middle of the screen
SavePos=1 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> lost position/window is restored on initial position
CTRL+ALT+F12 -> lost position/window is restored on initial position
SavePos=1 SaveSize=1:
double-click title bar -> restores window position = GOOD
maximize-button -> lost position/window is restored on initial position
CTRL+ALT+F12 -> lost position/window is restored on initial position
If you mix the options: "double-click title bar" to enter fullscreen-mode and then use maximize-button or CTRL+ALT+F12 to switch back to window-mode: window-position is correctly restored! -> maximize-button & CTRL+ALT+F12 are missing a small piece of code?
In other words, switching to fullscreen-mode using
double-click title bar -> window position is saved/remembered
maximize-button & CTRL+ALT+F12 -> window position is NOT saved/remembered
And a directly related problem: If you are in fullscreen-mode and use the minimize-button (title bar, 3rd from the right) the window-position (of the fullscreen-viewer) should NOT be saved/NOT overwrite the last saved window position of the viewer (but that happens). ((Here you have the above mentioned missing code at the wrong place?))
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
Updated
AdjustWindowRectEx change to AdjustWindowRectExForDpi (if Windows10)
void ClientConnection::saveScreenPosition()
sometimes save, after the window is maximized
later i see not all ok with CTRL+ALT+F12 (Restore not on Last Position)
to do FullScreenTitleBar painting font after change dpi
after FullScreen->Window->FullScreen the Font is OK
@Rudi can we make a Signed Dev?
AdjustWindowRectEx change to AdjustWindowRectExForDpi (if Windows10)
void ClientConnection::saveScreenPosition()
sometimes save, after the window is maximized
later i see not all ok with CTRL+ALT+F12 (Restore not on Last Position)
to do FullScreenTitleBar painting font after change dpi
after FullScreen->Window->FullScreen the Font is OK
@Rudi can we make a Signed Dev?
-
- 40
- Posts: 127
- Joined: 2014-12-31 22:10
Re: 1.3.3 dev 10
Thanks Thomas, further improvement: Double-click and maximize-button work, only CTRL+ALT+F12 does not restore window on Last Position.
Test-binary: vncviewer.exe/2021-07-29 10:58:57
Outcome:
SavePos=0 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> restores window position = GOOD
CTRL+ALT+F12 -> lost position/window is placed in the middle of the screen
SavePos=1 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> restores window position = GOOD
CTRL+ALT+F12 -> lost position/window is restored on initial position
SavePos=1 SaveSize=1:
double-click title bar -> restores window position = GOOD
maximize-button -> restores window position = GOOD
CTRL+ALT+F12 -> lost position/window is restored on initial position
If you are in fullscreen-mode and use the minimize-button (title bar, 3rd from the right) the window-position (of the fullscreen-viewer) should NOT be saved/NOT overwrite the last saved window position of the viewer. (Currently: If you bring back the minimized fullscreen-viewer and switch to window mode the last window position is lost = window will be positioned top left on the screen.)
Test-binary: vncviewer.exe/2021-07-29 10:58:57
Outcome:
SavePos=0 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> restores window position = GOOD
CTRL+ALT+F12 -> lost position/window is placed in the middle of the screen
SavePos=1 SaveSize=0:
double-click title bar -> restores window position = GOOD
maximize-button -> restores window position = GOOD
CTRL+ALT+F12 -> lost position/window is restored on initial position
SavePos=1 SaveSize=1:
double-click title bar -> restores window position = GOOD
maximize-button -> restores window position = GOOD
CTRL+ALT+F12 -> lost position/window is restored on initial position
If you are in fullscreen-mode and use the minimize-button (title bar, 3rd from the right) the window-position (of the fullscreen-viewer) should NOT be saved/NOT overwrite the last saved window position of the viewer. (Currently: If you bring back the minimized fullscreen-viewer and switch to window mode the last window position is lost = window will be positioned top left on the screen.)
- Rudi De Vos
- Admin & Developer
- Posts: 6863
- Joined: 2004-04-23 10:21
- Contact:
Re: 1.3.3 dev 10
When you provide the latest cpp and h files i will (manual) merge it and run the builder.
found code has been added to git
https://github.com/ultravnc/UltraVNC/tree/development
found code has been added to git
https://github.com/ultravnc/UltraVNC/tree/development
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
ClientConnection.cpp add restoreScreenPosition
ClientConnectionFullScreen.cpp remove unused from copy/paste
other small problem:
Window On Monitor1 with dpi 200%
Move with mouse to Monitor2 with dpi 100% to Top for Maximize, then restore
The Saved/Restored Position is with dpi factor
Code: Select all
case ID_CONN_ABOUT:
_this->ShowConnInfo();
return 0;
case ID_FULLSCREEN: // CTRL+ALT+F12
_this->SetFullScreenMode(!_this->InFullScreenMode());
if (!_this->InFullScreenMode())
_this->restoreScreenPosition();
return 0;
case ID_VIEWONLYTOGGLE:
Code: Select all
void ClientConnection::saveScreenPosition()
{
// if (!m_opts.m_SavePos)
GetWindowRect(m_hwndMain, &mainRect);
// if doubleclick Title don´t save
HMONITOR hMonitor = ::MonitorFromWindow(m_hwndMain, MONITOR_DEFAULTTONEAREST);
MONITORINFO mi;
mi.cbSize = sizeof(MONITORINFO);
GetMonitorInfo(hMonitor, &mi);
saveScreenPositionOK = (mainRect.left > mi.rcMonitor.left);
//saveScreenPositionOK = (mainRect.left > 0) && (mainRect.top > 0);
}
Window On Monitor1 with dpi 200%
Move with mouse to Monitor2 with dpi 100% to Top for Maximize, then restore
The Saved/Restored Position is with dpi factor
-
- 40
- Posts: 84
- Joined: 2015-01-23 06:45
Re: 1.3.3 dev 10
Update Files
move window to screen with other dpi:
NoFlicker -> SizeWindow if Window is 100% on other monitor
Autosize is working
move window to screen with other dpi:
NoFlicker -> SizeWindow if Window is 100% on other monitor
Autosize is working