PowerShell_Scripts
PowerShell_Scripts copied to clipboard
Unable to find type [System.Windows.Forms.ToolTipIcon]
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
Add this to the top of your script.
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")