Let me preface this question with first stating that I'm new to GUI interfaces: what's available, what can/can't be done, etc. With that being said, here we go!
I'm writing a PowerShell gui using System.Windows.Form objects and wanted to know if there are ICONS available in some inherent library available in Windows that I can invoke programmatically so that I don't have to manually create?
As an example, I'm looking to add little question-mark "?" icons next to some of my fields that would serve as like a mouse-over style help explaining specifics about x or y field.
Does such a thing exist? If so, does anyone have a good doc on what icons are available and how to invoke them in PowerShell? If not, does anyone have a solid work-around for what I'm describing?
Edit:
So I found out how to do this. You use the System.Drawing.SystemIcons and assign the invoked icon into the .Icon property of an object (if it has one).
form1.Icon = [System.Drawing.SystemIcons]::Question
I was hoping for something I could use in any control but I suppose this will work.
There sure is such a thing. I used it to create a MessageBox with selectable and copyable text once. You're looking for the System.Drawing.SystemIcons class: http://msdn.microsoft.com/en-us/library/system.drawing.systemicons.aspx
Here are some guidelines to using such icons: http://msdn.microsoft.com/en-us/library/aa511277.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With