The NotifyIcon Control - how do i apply the icon?

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
lontru
Posts: 103
Last visit: Thu Mar 09, 2023 1:59 pm

The NotifyIcon Control - how do i apply the icon?

Post by lontru »

https://info.sapien.com/index.php/guis/ ... on-control

I use this to set the tooltip text

$tooltip1.SetToolTip($textbox_SoftwareTesting, "Tooltip text")

How do i apply the info icon to above tooltip on the $textbox_SoftwareTesting button
chrome_c0x4fQScc8.png
chrome_c0x4fQScc8.png (14.99 KiB) Viewed 2093 times
jvierra
Posts: 15379
Last visit: Fri Mar 17, 2023 6:39 pm
Answers: 29
Has voted: 4 times
Been upvoted: 31 times

Re: The NotifyIcon Control - how do i apply the icon?

Post by jvierra »

Just follow the instructions. The name of the icon is all that is needed.

$tooltip1.ToolTipIcon = 'Error'
User avatar
lontru
Posts: 103
Last visit: Thu Mar 09, 2023 1:59 pm

Re: The NotifyIcon Control - how do i apply the icon?

Post by lontru »

so if i want to have different icon i have to create new tooltip*
jvierra
Posts: 15379
Last visit: Fri Mar 17, 2023 6:39 pm
Answers: 29
Has voted: 4 times
Been upvoted: 31 times

Re: The NotifyIcon Control - how do i apply the icon?

Post by jvierra »

I thought that was what you were doing. That is the code you posted. How else would you be using a tooltip?
Locked