forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How do I Change the Taskicon
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Hippo
Contributor
Contributor


Joined: 08 Feb 2005
Posts: 53

PostPosted: Thu Feb 17, 2005 4:45 pm    Post subject: How do I Change the Taskicon Reply with quote

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
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Feb 17, 2005 5:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Hippo
Contributor
Contributor


Joined: 08 Feb 2005
Posts: 53

PostPosted: Thu Feb 17, 2005 5:27 pm    Post subject: Reply with quote

The help file suggested I could change the tooltip but not the icon. Thanks I try that out Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Feb 17, 2005 6:06 pm    Post subject: Reply with quote

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. Wink

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 Smile

_________________
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
View user's profile Send private message Send e-mail
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Feb 17, 2005 6:17 pm    Post subject: Reply with quote

As much as I hate to say it, Mac's right and I'm wrong Confused 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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Thu Feb 17, 2005 6:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Hippo
Contributor
Contributor


Joined: 08 Feb 2005
Posts: 53

PostPosted: Thu Feb 17, 2005 11:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Feb 18, 2005 2:31 am    Post subject: Reply with quote

Jules - is there any way to change the icon in VDS 3
without using DIALOG REMOVE/DIALOG ADD? Confused

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Fri Feb 18, 2005 9:52 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Fri Feb 18, 2005 9:55 am    Post subject: Reply with quote

Mac wrote:
Jules - is there any way to change the icon in VDS 3
without using DIALOG REMOVE/DIALOG ADD? Confused

Cheers, Mac Smile


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
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Feb 18, 2005 6:30 pm    Post subject: Reply with quote

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. Wink

Thanks, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Fri Feb 18, 2005 7:02 pm    Post subject: Reply with quote

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 Wink

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sat Feb 19, 2005 4:34 am    Post subject: Reply with quote

Thanks Bill, but it's no big deal - and I have another project
I'm working on at the moment... Wink Wink Wink

Was mostly just curious.

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Hippo
Contributor
Contributor


Joined: 08 Feb 2005
Posts: 53

PostPosted: Sat Feb 19, 2005 11:13 am    Post subject: Reply with quote

Thanks for the help guys, I have it sorted Smile
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Mon Feb 21, 2005 4:28 am    Post subject: Reply with quote

For VDS3 you can use the VDSGUI extension dll which has
an advanced Taskicon element with Balloon tool tip support too.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group