https://github.com/pascalvault/lazarus_getmonitorsinfo
Returns Resolution, Diagonal and PPI of active monitors
https://github.com/pascalvault/lazarus_getmonitorsinfo
lazarus
Last synced: 3 months ago
JSON representation
Returns Resolution, Diagonal and PPI of active monitors
- Host: GitHub
- URL: https://github.com/pascalvault/lazarus_getmonitorsinfo
- Owner: PascalVault
- License: mit
- Created: 2022-11-12T12:13:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-13T13:03:20.000Z (over 3 years ago)
- Last Synced: 2025-01-17T18:24:41.410Z (over 1 year ago)
- Topics: lazarus
- Language: NASL
- Homepage:
- Size: 249 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GetMonitorsInfo
Returns Resolution, Diagonal and PPI of active monitors
## Requirements
Delphi 7+, Lazarus
## Operating system
Windows XP+
### Usage example
var Info: TMonitorInfos;
Len: Integer;
i: Integer;
begin
GetMonitorsInfo(Info, Len);
for i:=0 to Len-1 do begin
Memo1.Lines.Add( Format('Resolution: %d x %d px', [Info[i].ResolutionH, Info[i].ResolutionV]) );
Memo1.Lines.Add( Format('Size: %f x %f cm', [Info[i].SizeH, Info[i].SizeV]) );
Memo1.Lines.Add( Format('Diag: %f inch', [Info[i].Diagonal]) );
Memo1.Lines.Add( Format('PPI: %f ', [Info[i].PPI]) );
Memo1.Lines.Add( Format('Dot Pitch: %f mm', [Info[i].DotPitch]) );
Memo1.Lines.Add( Format('Aspect Ratio: %f:1 ', [Info[i].AspectRatio]) );
Memo1.Lines.Add( Format('Year: %d ', [Info[i].ManufactureYear]) );
Memo1.Lines.Add( Format('Manufacturer: %s ', [Info[i].Manufacturer]) );
Memo1.Lines.Add( Format('PNP: %s', [Info[i].PNPID]) );
Memo1.Lines.Add('-----------');
end;
end;