imniko / SetDPI

The Unlicense
365 stars 45 forks source link

Is it possible to set DPI larger than 250 on Windows 11? #22

Open TrueZhuangJia opened 2 months ago

TrueZhuangJia commented 2 months ago

The highest DPI can be set by setDpi.exe seems to be constrained to 250 on Windows 11

joShu001 commented 1 month ago

Yes, if your computer supports it. That is, i believe the upper limit is determined by your computer. If your display settings can go to 300 then SetDPI can go to 300. My AHK / SetDPI script on Windows 11 toggles between 175, 225, 300 without any problems.

joShu001 commented 1 month ago

this is the script i use and it successfully tri-toggles up to 300 dpi

#Requires AutoHotkey v2.0

; Define the DPI scaling values for the three states. 
DPIScalingValues := ["175", "225", "300"]   ;These must be actually available per the Display Settings (cant do 314.15)
CurrentState := 1                   ;global by default since defined above function

; Path to the SetDPI.exe tool, note the space after exe
SetDPIPath := "C:\Users\... your path ...\SetDPI\SetDpi.exe "

; Toggle between the three DPI scaling states when Ctrl + Win + F1 is pressed
^#F1::
{
    global DPIScalingValue := DPIScalingValues[CurrentState]

    ; Run the SetDPI.exe tool with the specified DPI scaling value
    Run SetDPIPath DPIScalingValue

    Switch CurrentState
    {
        case 1: global CurrentState := 2
        case 2: global CurrentState := 3
        case 3: global CurrentState := 1
    }

}