Those can't really determine if you're app is virtualized, only if the system DPI is same as what VB's internal DPI is. In most cases when DPI > 150%, system DPI is not same as VB's internal DPI when app is system-aware.
If app is system-aware it is not virtualized if launched into system DPI, whether those comparisons are equal or not. However, let's say app is system-aware and launched into DPI 100%,125%,150% then VB's internal DPI matches system DPI and if those comparisons are not equal, then virtualization is in play. But at 175% DPI, those comparisons won't be equal whether virtualization applies or not.
If app is not manifested, it is virtualized if those comparisons are not equal
Do note that that other thread did not discuss per-monitor awareness since it was not a serious discussion in the VB community at the time. I think that thread is well overdue for updating.
Edited: Prior to Win8.1, per-monitor awareness didn't exist. Apps were either unaware or system aware only.
Last edited by LaVolpe; Sep 18th, 2020 at 10:57 AM.
Insomnia is just a byproduct of, "It can't be done"
If app is not manifested, it is virtualized if those comparisons are not equal
Ok. thanks. That was really my question. if NOT manifested, then those comparisons <> will confirm app is virtualized with all OS's and all DPI's > 96?
Ok. thanks. That was really my question. if NOT manifested, then those comparisons <> will confirm app is virtualized with all OS's and all DPI's > 96?
Except XP. It didn't have manifests for awareness, system settings only.
Insomnia is just a byproduct of, "It can't be done"
FYI: DPI virtualization on modern systems is not static. An app can move into and out of virtualization as DPI changes.
Oh, regarding unmanifested apps. There is one gotcha & possibly another.
1. If dragging the app to another monitor not having 96 DPI, that comparison won't work because it is based on the primary monitor's DPI. In that case, need to check the DPI on the monitor the app is currently dragged to. There are APIs to determine which monitor your app is on and to get the DPI for that monitor (if scenario applies)
2. I don't have a monitor that rotates 90 degrees. So, I don't know what results would be returned in that case.
Edited. Typically, an app does not need to know if it is currently DPI-virtualized or not.
Last edited by LaVolpe; Sep 18th, 2020 at 11:50 AM.
Insomnia is just a byproduct of, "It can't be done"
So, with Win7, when does OS use virtualization? Testing a non-manifested exe, from my tests with Win7, it seems that XP style scaling (TPP changes with change in DPI setting) is always working, and i don't see a condition where virtualization is triggered? The compatibility settings (use XP style scaling) don't seem to make any difference. it's non-virtualization in all cases (125%, 150%, 200%).
...
2) Vista/Win7. There are two scaling modes used that apply to all applications except DPI-aware ones
a) XP-Style scaling. This is a system-wide setting and disables DPI virtualization. No longer available as of Win8. After Win7, your only option is virtualization if the app is not declared DPI-aware.
b) DPI Virtualization. This is probably the worst option and applies to applications that are not DPI-aware. What happens is that your application runs under a 96 DPI environment, regardless of real DPI setting. Anything that is displayed on screen is rendered to an off-screen bitmap and stretched to the DPI scale. For an easy visualization, screen capture your app into MS Paint. Now stretch that image by 125% to 200%. That is exactly what your app will look like in DPI virtualization if it is not declared as DPI-aware or DPI vritualization is not disabled.
If your system has that option set, then that would explain what you are seeing. That setting can be seen on the screenshot from this site; jump to Figure D and you'll see the checkbox to enable XP-style scaling. Sorry, I don't have Win7 to play along.
Insomnia is just a byproduct of, "It can't be done"
Here are some notes I have...
If your system has that option set, then that would explain what you are seeing. That setting can be seen on the screenshot from this site; jump to Figure D and you'll see the checkbox to enable XP-style scaling. Sorry, I don't have Win7 to play along.
LaVolpe - good notes on that link. It seems that IF Basic Windows theme is selected, then the "Use XP style scaling" checkbox is greyed out and defaulted (checked) for 100% and 125% scaling, and is greyed out defaulted (unchecked) for anything higher than 125% scaling. If using an Aero Theme, the "Use XP style scaling" checkbox is no longer greyed out, and I can select checked/not checked. Unfortunately, it seems that any combination of Basic/Aero themes and "Use XP style scaling" checked OR not-checked, results in the same condition = no virtualization. Weird. I don't know how to view any virtualization in Win7.
...Weird. I don't know how to view any virtualization in Win7.
Maybe try this? Add a manifest and in the <dpiAware> element, make the value: false. Idea is that by including a manifest and saying it is not dpi-aware, then maybe your Win7 system will honor that?
Insomnia is just a byproduct of, "It can't be done"