Windows.Forms.Clipboard issues

I am having problems retrieving an image from my clipboard. The printscreen press works, as I can paste into MS paint. Tried increasing the wait time to 1500 and that didn’t help.

ContainsImage() returns false, and GetImage() doesn’t pull anything. Any advice appreciated.

Add-Type -AssemblyName System.Windows.Forms Start-Sleep -Milliseconds 250 [Windows.Forms.Sendkeys]::SendWait("%{PrtSc}") Start-Sleep -Milliseconds 500 [Windows.Forms.Clipboard]::ContainsImage() $bitmap = [Windows.Forms.Clipboard]::GetImage() 

submitted by /u/Khord
[link] [comments]

Leave a Reply