Private/Other/ScreenPNG.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
function New-SystemDrawingBitmapPrimary { [CmdletBinding()] param () Return New-Object System.Drawing.Bitmap $GetDisplayPrimaryBitmapSize.Width, $GetDisplayPrimaryBitmapSize.Height } function New-SystemDrawingBitmap { [CmdletBinding()] param () Return New-Object System.Drawing.Bitmap $Device.Bounds.Width, $Device.Bounds.Height } function New-SSGraphics { [CmdletBinding()] param () Return [System.Drawing.Graphics]::FromImage($ScreenShotBitmap) } |