PowerShell_Scripts icon indicating copy to clipboard operation
PowerShell_Scripts copied to clipboard

Unable to find [System.Windows.Forms.ToolTipIcon] on windows7

Open xiebruce opened this issue 6 years ago • 1 comments

I'm totally new in powershell, I add this:

Invoke-BalloonTip -Message 'This is a  message from my function' -Title 'Attention!' -MessageType  Info 

to the bottom of Invoke-BalloonTip.ps1: image

Then I execute it:

PS C:\Users\bruce\Desktop> .\Invoke-BalloonTip.ps1

The error showed up: image

xiebruce avatar Mar 26 '19 12:03 xiebruce

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