| View previous topic :: View next topic |
| Author |
Message |
Hippo Contributor


Joined: 08 Feb 2005 Posts: 53
|
Posted: Thu Feb 17, 2005 4:45 pm Post subject: How do I Change the Taskicon |
|
|
My application can be minimized to the tray. When it's minimized a tooltip on the taskicon will display infomation. However I want the taskicon to change to also show limited information.
How do I go about changing the taskicon? My Idea is to change the icon dependent on other values ie if value = 1, then display icon1 if value = 2 then display icon2 etc.
Hippo |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Thu Feb 17, 2005 5:10 pm Post subject: |
|
|
If I'm not mistaken you can use DIALOG SET,<name>,<iconPath>.
I'm fairly sure that the answer is in the help file somewhere. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Hippo Contributor


Joined: 08 Feb 2005 Posts: 53
|
Posted: Thu Feb 17, 2005 5:27 pm Post subject: |
|
|
The help file suggested I could change the tooltip but not the icon. Thanks I try that out  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Feb 17, 2005 6:06 pm Post subject: |
|
|
I think ya have to use DIALOG REMOVE to remove the
taskicon element, then DIALOG ADD again to re-create
it with a different icon.
At least that's what I have to do with VDS 3.
The downside is that the icon will be re-added to the tray
on the right each time, so it may be moving around some.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Thu Feb 17, 2005 6:17 pm Post subject: |
|
|
As much as I hate to say it, Mac's right and I'm wrong You need to
remove and re-add the TASKICON in order to change it, unless you're
using VDS 5 and then you could try the Shell_NotifyIcon() API. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Thu Feb 17, 2005 6:55 pm Post subject: |
|
|
I'm sure you don't have to remove and recreate it. I'm sure one of the examples (it's an API one) gets CPU usage information and shows the percentage by changing the icon. You use the same dialog set command: if it's an icon file or resource it changes the icon, if it's text, it changes the toltip. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Hippo Contributor


Joined: 08 Feb 2005 Posts: 53
|
Posted: Thu Feb 17, 2005 11:44 pm Post subject: |
|
|
Thanks for the help guys, I found that you can use DIALOG SET,TASKICON,TASKICONNAME,icon.ico to set the taskicon ico. I did find however that the .ico file will only be included in the exe (using #icon.ico) on the DIALOG ADD command.
I found a quick workaround by adding another taskicon in a section of the program that will never be run. The compiler then added it. |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Feb 18, 2005 2:31 am Post subject: |
|
|
Jules - is there any way to change the icon in VDS 3
without using DIALOG REMOVE/DIALOG ADD?
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Fri Feb 18, 2005 9:52 am Post subject: |
|
|
| Hippo wrote: | Thanks for the help guys, I found that you can use DIALOG SET,TASKICON,TASKICONNAME,icon.ico to set the taskicon ico. I did find however that the .ico file will only be included in the exe (using #icon.ico) on the DIALOG ADD command.
I found a quick workaround by adding another taskicon in a section of the program that will never be run. The compiler then added it. |
There's a #RESOURCE ADD directives to add extra resources to the executable. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Fri Feb 18, 2005 9:55 am Post subject: |
|
|
| Mac wrote: | Jules - is there any way to change the icon in VDS 3
without using DIALOG REMOVE/DIALOG ADD?
Cheers, Mac  |
Sorry I don't know anything about VDS 3 (or 4 for that matter.) I no longer have a copy of it, nor do I have the source code of it to find out the answer to your question.
My guess is that this was a feature that I added in VDS 5, and so in earlier versions, you can't (since you don't have the API access functions either.) _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Feb 18, 2005 6:30 pm Post subject: |
|
|
Actually with VDSug.dll I do have quite a bit of API access,
but it only has support for a few basic structs and I don't
think they work for icons.
Thanks, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Fri Feb 18, 2005 7:02 pm Post subject: |
|
|
Hey Mac,
Ya know it would be very easy to add that functionality to VDSug.dll. It's
a really simple task. Need any info, ya know how to reach me  _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sat Feb 19, 2005 4:34 am Post subject: |
|
|
Thanks Bill, but it's no big deal - and I have another project
I'm working on at the moment...
Was mostly just curious.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Hippo Contributor


Joined: 08 Feb 2005 Posts: 53
|
Posted: Sat Feb 19, 2005 11:13 am Post subject: |
|
|
Thanks for the help guys, I have it sorted  |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Feb 21, 2005 4:28 am Post subject: |
|
|
For VDS3 you can use the VDSGUI extension dll which has
an advanced Taskicon element with Balloon tool tip support too. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
|