PowerShell_Scripts icon indicating copy to clipboard operation
PowerShell_Scripts copied to clipboard

Unable to find type [System.Windows.Forms.ToolTipIcon]

Open bvduijn opened this issue 6 years ago • 1 comments

https://github.com/proxb/PowerShell_Scripts/blob/65d0ac81cb2f73b51dba318e6ae721bdea0db204/Invoke-BalloonTip.ps1#L46

This object type doesn't work here. The assembly is loaded later so this produces an error.

To resolve just remove this from the parameter as the object type is set later in this line https://github.com/proxb/PowerShell_Scripts/blob/65d0ac81cb2f73b51dba318e6ae721bdea0db204/Invoke-BalloonTip.ps1#L78

bvduijn avatar Nov 21 '19 12:11 bvduijn

Add this to the top of your script.

[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") 
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

DraxCodes avatar Aug 08 '20 23:08 DraxCodes