1) open Registry ... use REGEDIT command 2) find by "PerMonitorSettings" and found it
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
Function GetDPIRate: Double; Var DC: HDC; Begin Try DC := GetDC(0); Result := GetDeviceCaps(DC, LOGPIXELSX) / 96; ReleaseDC(0, DC); If Result <= 0 Then Result := 1; Except Result := 1; End; End;
----------------------------------------------
-
procedure TForm1.Button1Click(Sender: TObject); const MyKeyToFound: string = '\Control Panel\Desktop\PerMonitorSettings\'; begin try // // Computer\HKEY_CURRENT_USER\Control Panel\Desktop\PerMonitorSettings\<<THE NAME CHANGE IN EACH COMPUTER>> // if MyRegistry.KeyExists(MyKeyToFound) then begin if MyRegistry.OpenKey(MyKeyToFound, false) then MyRegistry.GetKeyNames(ListBox1.Items); end else ShowMessage('Key [' + MyKeyToFound + '] dont exist in your registry path. Try another...'); finally end; end;
procedure TForm1.FormCreate(Sender: TObject); begin MyRegistry := TRegistry.Create; // MyRegistry.RootKey := HKEY_CURRENT_USER; // where start the works? end;
procedure TForm1.FormDestroy(Sender: TObject); begin if not(MyRegistry = nil) then begin MyRegistry.CloseKey; // FreeAndNil(MyRegistry); end; end;
procedure TForm1.ListBox1Click(Sender: TObject); begin if (ListBox1.ItemIndex > -1) then begin if MyRegistry.OpenKey(ListBox1.Items[ListBox1.ItemIndex], false) then begin Caption := MyRegistry.CurrentPath; // MyRegistry.GetValueNames(ListBox2.Items); end; end; end;
procedure TForm1.ListBox2Click(Sender: TObject); begin if (ListBox2.ItemIndex > -1) then begin ShowMessage( { } Format('%s'#13#10'Value: %s'#13#10'Content: %s', [ { } ListBox1.Items[ListBox1.ItemIndex], { } ListBox2.Items[ListBox2.ItemIndex], { } MyRegistry.GetDataAsString(ListBox2.Items[ListBox2.ItemIndex]) { } ]) { } ); end; end;
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
FULL HD = 1920x1080 = 100% 25% = factor (maybe the Display-Resolution Min-Max can changes this value) ... (0 x 25)+ 100% (1 x 25)+ 100% (2 x 25)+ 100% (3 x 25)+ 100% (4 x 25)+ 100% etc...
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
I dont understand the translating... What is "Reference Material"?
And, what you needs (in fact) to do?
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
https://zh.wikipedia.org/wiki/%E6%98%BE%E7%A4%BA%E5%88%86%E8%BE%A8%E7%8E%87%E5%88%97%E8%A1%A8
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
Scale, DPI, Resolution in MSWindows Display on changing setting http://bbs.2ccc.com/topic.asp?topicid=621633
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
procedure TForm1.Button1Click(Sender: TObject); function GetDPIRate: Double; var DC: HDC; begin try try DC := GetDC(0); Result := GetDeviceCaps(DC, LOGPIXELSX) / 96; // except Result := 1; end; finally ReleaseDC(0, DC); end; // if Result <= 0 then Result := 1; end;
begin ShowMessage(GetDPIRate.ToString); end;
https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-getdevicecaps GetDeviceCaps --> 32bits O.S. / Gdi32.dll Return value --- The return value specifies the value of the desired item.
Minimum supported client Windows 2000 Professional [desktop apps only] Minimum supported server Windows 2000 Server [desktop apps only] Target Platform Windows Header wingdi.h (include Windows.h) Library Gdi32.lib DLL Gdi32.dll
Remarks When nIndex is SHADEBLENDCAPS:
For a printer, GetDeviceCaps returns whatever the printer reports. For a display device, all blending operations are available; besides SB_NONE, the only return values are SB_CONST_ALPHA and SB_PIXEL_ALPHA, which indicate whether these operations are accelerated. On a multiple monitor system, if hdc is the desktop, GetDeviceCaps returns the capabilities of the primary monitor. If you want info for other monitors, you must use the multi-monitor APIs or CreateDC to get a HDC for the device context (DC) of a specific monitor.
When nIndex is BITSPIXEL and the device has 15bpp or 16bpp, the return value is 16.
LOGPIXELSX: Number of pixels per logical inch along the screen width. In a system with multiple display monitors, this value is the same for all monitors.
LOGPIXELSY: Number of pixels per logical inch along the screen height. In a system with multiple display monitors, this value is the same for all monitors.
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3