Reorganise gists folder
This commit is contained in:
11
codegrab/powershell/getscreen.psm1
Normal file
11
codegrab/powershell/getscreen.psm1
Normal file
@@ -0,0 +1,11 @@
|
||||
Function Get-Screen
|
||||
{
|
||||
[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
|
||||
$size = [Windows.Forms.SystemInformation]::VirtualScreen
|
||||
$bitmap = new-object Drawing.Bitmap $size.width, $size.height
|
||||
$graphics = [Drawing.Graphics]::FromImage($bitmap)
|
||||
$graphics.CopyFromScreen($size.location,[Drawing.Point]::Empty, $size.size)
|
||||
$graphics.Dispose()
|
||||
$bitmap.Save($args[0])
|
||||
$bitmap.Dispose()
|
||||
}
|
||||
Reference in New Issue
Block a user