views:

519

answers:

2

Hi there,

Is it possible to modify NotifyIcon behavior to AlwaysShow in C#? A code snippet would be greatly appreciated:) Thanks in advance...

Cheers

---edited

One of our clients said quote "it seems necessary to customise icons to always show". What he meant was that he has to do it manually by r-clicking on task bar then click on Properties -> Task Bar -> Customize Notifications and then you can set behavior to Always Show / Always Hide / Hide when inactive for each taskbar icon on the list.

Can you do that programically in C#?

I want to ensure that my NotifyIcon is ALWAYS visible. I'm already setting icon.Visible = true but it looks like it doesn't work for him hence the complaint.

Is there any easy way of setting the behavior by altering [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify] IconsStream registry value?

A: 
NotifyIcon icon = ...;
icon.Visible = true;

Edit for updated information: There shouldn't be, and if for some reason it exists, don't use it. That's the user's preference, not yours.

280Z28
you made a valid point... that's what I originally said but I get a bit of pressure from my management to have it done otherwise the universe will collapse...
pRintLn
A: 

I'm sure it's possible with enough Registry hacking, but not at all recommended. They added the collapsing-notification-area behavior in XP because so many applications were shoving themselves in that space. Much like Start Menu pinning behavior in XP/Vista/7, the lack of a public API means you're supposed to let the user decide that sort of thing.

ChrisV