Don't allow notifyIcon to be hidden
-
Is there some way to stop Windows from hiding a notifyIcon? I'm not afraid of API calls if they're necessary. We're developing a program that will minimize to the tray and it's important that it's icon is always visible (it updates the user by changing the icon as events occur). I'm sure there's a way, since the Windows icons do it. Thanks, Ray Phillips Jeff Computers StudyX.com
-
Is there some way to stop Windows from hiding a notifyIcon? I'm not afraid of API calls if they're necessary. We're developing a program that will minimize to the tray and it's important that it's icon is always visible (it updates the user by changing the icon as events occur). I'm sure there's a way, since the Windows icons do it. Thanks, Ray Phillips Jeff Computers StudyX.com
NotifyIcons do what you tell them to do, they don't just disappear. In fact you have to add extra code (a call to Dispose) to make sure they disappear when your app exits. If your NI disappears inadvertently it tells me it is being garbage collected, which implies you didn't give it enough scope. Is it a member of your form class? It should not be a local variable! :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
NotifyIcons do what you tell them to do, they don't just disappear. In fact you have to add extra code (a call to Dispose) to make sure they disappear when your app exits. If your NI disappears inadvertently it tells me it is being garbage collected, which implies you didn't give it enough scope. Is it a member of your form class? It should not be a local variable! :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
What I meant was, if the user has auto hiding of their notify icons turned on, the icon gets "hidden" (where you have to push the arrow to see the "hidden" icons). We need ours to always be visible. It's not that the icon is disappearing, per se; it's being hidden until the user clicks that arrow. Sorry for the confusion :) -Ray Jeff Computers StudyX.com
-
What I meant was, if the user has auto hiding of their notify icons turned on, the icon gets "hidden" (where you have to push the arrow to see the "hidden" icons). We need ours to always be visible. It's not that the icon is disappearing, per se; it's being hidden until the user clicks that arrow. Sorry for the confusion :) -Ray Jeff Computers StudyX.com
You must be using Windows 7 then. I expect the official stance will be: the behavior of NotifyIcons is a user's choice, and should not be set by the app; the user can: - have inactive icons hidden (the default?); - have all icons show; - choose for each individual icon (the choice persists, seems associated with the EXE file, not the process). I am unaware of any code that would allow an app to change its own NotifyIcon behavior. However, there is this article that may interest you: WPF NotifyIcon[^]. PS: the Windows icons that always show are "system icons", they are handled differently; I don't expect the NotifyIcon class maps to them at all. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
You must be using Windows 7 then. I expect the official stance will be: the behavior of NotifyIcons is a user's choice, and should not be set by the app; the user can: - have inactive icons hidden (the default?); - have all icons show; - choose for each individual icon (the choice persists, seems associated with the EXE file, not the process). I am unaware of any code that would allow an app to change its own NotifyIcon behavior. However, there is this article that may interest you: WPF NotifyIcon[^]. PS: the Windows icons that always show are "system icons", they are handled differently; I don't expect the NotifyIcon class maps to them at all. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
XP allows the notify icons to be hidden as well. There is a setting in XP to allow you to change an icon to be always hide, or always show. So even if you were to programmatically change it, you might have to try to detect if the user changed it manually and to change it back.
Steve Maier
-
XP allows the notify icons to be hidden as well. There is a setting in XP to allow you to change an icon to be always hide, or always show. So even if you were to programmatically change it, you might have to try to detect if the user changed it manually and to change it back.
Steve Maier
Ho hum... that's what I was afraid of. lol. Thanks for the replies. Looks like I'll have to find a "creative solution". The Code Project and it's community ROCKS! :cool: -Ray Jeff Computers StudyX.com
-
Ho hum... that's what I was afraid of. lol. Thanks for the replies. Looks like I'll have to find a "creative solution". The Code Project and it's community ROCKS! :cool: -Ray Jeff Computers StudyX.com
-
Ho hum... that's what I was afraid of. lol. Thanks for the replies. Looks like I'll have to find a "creative solution". The Code Project and it's community ROCKS! :cool: -Ray Jeff Computers StudyX.com
LCARS x32 wrote:
Looks like I'll have to find a "creative solution".
Most users would prefer that you didn't. Let the user decide whether he wants the icon hidden or not. It is not for applications (and their designers) to tell users how their desktop should be managed.
I must get a clever new signature for 2011.
-
Ho hum... that's what I was afraid of. lol. Thanks for the replies. Looks like I'll have to find a "creative solution". The Code Project and it's community ROCKS! :cool: -Ray Jeff Computers StudyX.com