send systray icon notification in W7

Just starting out? Need help? Post your questions and find answers here.
User avatar
wichtel
User
User
Posts: 71
Joined: Fri May 02, 2003 11:14 am
Location: Germany
Contact:

Re: send systray icon notification in W7

Post by wichtel »

Why not send some notification text to your icon, Windows 7 then show the icon and we hide again once the notification has timed out.
You're a funny guy, because you just gave the answer to my initial question and seemingly didn't realize it.
THANKS A LOT @em_uk!!!
That is the piece of code I never got going for whatever reason.

Thanks again. Perfect.
Mike
PB 5.40 LTS, W7,8,10 64bit and Mint x64
User avatar
aaaaaaaargh
User
User
Posts: 55
Joined: Thu Jul 27, 2006 1:24 pm

Re: send systray icon notification in W7

Post by aaaaaaaargh »

em_uk wrote:Why not send some notification text to your icon, Windows 7 then show the icon and we hide again once the notification has timed out.

You can also change the #NIIF_INFO and the end for different types of notifications eg : #NIIF_USER, #NIIF_WARNING, #NIIF_ERROR
Yes thanks, but that is just avoiding the issue, I didn't want a popup.
I really think PB needs a Library for Win7 specific UI stuff, systray, taskbar preview, jumplist stuff, PB is still stuck in the good old WinXP times...
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Re: send systray icon notification in W7

Post by em_uk »

Do you have an example of a program that can make its own icon appear without showing a notification?
----

R Tape loading error, 0:1
User avatar
aaaaaaaargh
User
User
Posts: 55
Joined: Thu Jul 27, 2006 1:24 pm

Re: send systray icon notification in W7

Post by aaaaaaaargh »

em_uk wrote:Do you have an example of a program that can make its own icon appear without showing a notification?
The Windows Action Center and the "Safe device removal thingy" can do it, but I guess that they use some undocumented trick :(
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Re: send systray icon notification in W7

Post by em_uk »

I disagree. I don't see anything extra in the API that can do this, I doubt the OS would break its own rules.

I have just tested "Safely Remove Hardware" and it operates just like the other icons, if it can show the icon it will but if the area is full the icon will be hidden. The same as what happens when I add my application to the tray. This also applies to the Action Center (right now on my machine it is hidden).

What you are trying to do is override how the user has configured the options. Sure, you may be able to hack you icon to show, but if a user has explicitly told the tray to hide all icons apart notifications you honour that and shouldn't be thinking of ways to combat that choice.

The proper way to get the users attention is to show a notification, this what is documented and that is what you should be using.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Also see :

http://msdn.microsoft.com/en-us/library ... 11448.aspx

Specifically "Keeping users in control", "Guide lines" and "When to show"
----

R Tape loading error, 0:1
User avatar
aaaaaaaargh
User
User
Posts: 55
Joined: Thu Jul 27, 2006 1:24 pm

Re: send systray icon notification in W7

Post by aaaaaaaargh »

em_uk wrote:I disagree. I don't see anything extra in the API that can do this, I doubt the OS would break its own rules.

I have just tested "Safely Remove Hardware" and it operates just like the other icons, if it can show the icon it will but if the area is full the icon will be hidden. The same as what happens when I add my application to the tray. This also applies to the Action Center (right now on my machine it is hidden).

What you are trying to do is override how the user has configured the options. Sure, you may be able to hack you icon to show, but if a user has explicitly told the tray to hide all icons apart notifications you honour that and shouldn't be thinking of ways to combat that choice.

The proper way to get the users attention is to show a notification, this what is documented and that is what you should be using.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Also see :

http://msdn.microsoft.com/en-us/library ... 11448.aspx

Specifically "Keeping users in control", "Guide lines" and "When to show"
Ah well, I guess you are right, I'll just have to display a popup, thanks for the effort. While one the subject of Win7 "Guide Lines", any idea how one would I display a "Notification area flyout" and a "Thumbnail toolbar" as mentioned on the microsoft page?
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Re: send systray icon notification in W7

Post by em_uk »

There is nothing special about the notification fly out, it's just a window with no title

http://stackoverflow.com/questions/7135 ... net-framew

You need to get the positioning right and create an activating/deactivating procedures.
----

R Tape loading error, 0:1
User avatar
aaaaaaaargh
User
User
Posts: 55
Joined: Thu Jul 27, 2006 1:24 pm

Re: send systray icon notification in W7

Post by aaaaaaaargh »

em_uk wrote:There is nothing special about the notification fly out, it's just a window with no title

http://stackoverflow.com/questions/7135 ... net-framew

You need to get the positioning right and create an activating/deactivating procedures.
Great, thank you! (I looks like nothing much changed in Win7 after all :D )
Post Reply