Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 17th, 2003, 05:47 AM
Annelid Annelid is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 4 Annelid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
multiple icons in one exe

I'm making a program that associates itself with two different file types, and would like to use a different icon for each type. How do i make the program store both icons, and then access them?

i am using the registry API setKeyValue to set the defaulticon for each type... the line

App.Path & "\" & App.EXEName & ".exe,0"

will access the program's main icon, but when i add more icons to the program and attempt to change the 0 to any other icon index the file type's icon becomes the default for windows, indicating the icon evidently could not be found.

any help is greatly appreciated, i am trying to keep this all one .exe because it is a small time program, otherwise i would add a resource file.

Reply With Quote
  #2  
Old June 5th, 2003, 02:56 PM
kaarde kaarde is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 1 kaarde User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
use a ressource file in you project, you can load icons from it with this cammand

LoadResPicture (index, Format)

Format :

0 = VbResBitmap
1 = VbResIcon
2 = VbResCursor

when compiled the .res is included in your app, then when you set the icon to 1 it'll load the icon at index 1 in your app instead of reverting to windows default.

hope it helps

Reply With Quote
  #3  
Old June 5th, 2003, 07:49 PM
Annelid Annelid is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 4 Annelid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ahh ok... everywhere i looked the way they worded things implied that i would have to have a .res file along with the .exe and give both to everyone, i was not aware that the .res was included... *smacks head* doh and i didnt try it before.

thanks very much!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > multiple icons in one exe


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway