[Implemented] Change Systray Icon

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

[Implemented] Change Systray Icon

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

Hi,
I like to have a command so a icon in the Systray can be changed.
Tryed it with my own commands(API) but I can only create Systray Icon's, not change it...

Also tryed to set the tooltip for it and I get errors with the NAsm structure NOTIFYICONDATA because 'szTip' is declared as binary instead of String (maybe because of the fixed lenght of 64 byte)
Don't get it to create a string and convert it as binary and fill 'szTip' with it.

I have builded my own structure and declared 'szTip' as string and the tooltip appears, but the string is wrong (3 strange chars)

How to do that in PureBasic?

BTW it would be nice to have also the possibility to change the app icon (like email clients when they sign on that a new mail is arrived).

And it would be nice to have tooltips for buttons or for all gadgets.




Have a nice day...
Franco
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Post your coad about the tooltip and I could have a look to it. Declaring .b[64] instead of .s (string) is TRUE because it's a buffer inside the structure and not a pointer to a string (so you guess it, a ToolTip text can't have more than 64 characters). To put the right text:

PokeS(@Structure\szTip, "My tooltip text")

About a command to change the icon, I will try to do it.

Bye,

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

2 new commands done: ChangeSystrayIcon() and SystrayIconToolTip(). For the next release...

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.
2 new commands done: ChangeSystrayIcon() and SystrayIconToolTip(). For the next release...

Fred - AlphaSND
Thanks Fred, stopped to work on my code (my code to create a icon is slower than the PB build in function, don't know why) and I'm waiting for the things to come...


Have a nice day...
Franco
Post Reply