11 lines
687 B
PowerShell
11 lines
687 B
PowerShell
$ErrorActionPreference = 'Continue'
|
|
Add-Type -AssemblyName System.Windows.Forms
|
|
Add-Type -AssemblyName System.Drawing
|
|
$screens = [System.Windows.Forms.Screen]::AllScreens
|
|
foreach ($s in $screens) {
|
|
Write-Output ("Screen: Bounds={0} Primary={1} WorkingArea={2}" -f $s.Bounds, $s.Primary, $s.WorkingArea)
|
|
}
|
|
Write-Output ("PrimaryCenterPx: {0}" -f ([System.Windows.Forms.Screen]::PrimaryScreen.Bounds | ForEach-Object { '{0},{1}' -f ($_.X + $_.Width/2), ($_.Y + $_.Height/2) }))
|
|
$dpi = Get-ItemProperty 'HKCU:Control PanelDesktopWindowMetrics' -Name AppliedDPI -ErrorAction SilentlyContinue
|
|
Write-Output ("AppliedDPI(reg): {0} -> {1}%" -f $dpi.AppliedDPI, ($dpi.AppliedDPI / 96 * 100))
|