Q: During runtime, how to get the boolean for DPI awareness, is it enabled or not?
In Compiler Options, we can check the option "Enable DPI aware executable (Windows)".
I thought to find something like a constant #PB_Compiler_DPI_Awareness or something like that, but alas...
Internal Variable for DPI awareness
Internal Variable for DPI awareness
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
Re: Internal Variable for DPI awareness
Hi charvista
Try the next snippet
It's originally posted by Blue
Modified by RASHAD
Try the next snippet
It's originally posted by Blue
Modified by RASHAD
Code: Select all
EnableASM
Procedure.i DPi_option_checked()
MOV eax, dword [PB_Compiler_DPIAware]
ProcedureReturn
EndProcedure
DisableASM
If DPi_option_checked()
; do this and that
EndIf
Debug "DPi_option_checked() ? " + DPi_option_checked()
Egypt my love
Re: Internal Variable for DPI awareness
Ah, in Assembler code.
Excellent, it works well.
Thank you !
Excellent, it works well.
Thank you !
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%