PDA

Click to See Complete Forum and Search --> : Does no one know this answer? Is is impossible?


clonE
Jan 22nd, 2000, 10:58 AM
ok, sorry for the ambiguous title, but I think it fits this question. The deal here is that I have posted this question all over the place, this board, plenty of other boards, I have never ever gotten an answer, yet I have seen this done with vb before. If anyone has a clue with this, I totally thank you for your time:

when you click on the icon for the program, instead of showing the same icon dimmed or greyed, how would i change it into a whole different icon. keep in mind that the program that the icon changes for is not running, so is there any kind of code that will assign another icon you specify instead of the same old dimmed icon? i know the program that had the icons like this, was made in vb (i dont know which version) (im using vb5 ent.), but if anyone could help me out, it would be
appreciated, thanks.

(if my question seems unclear...)
what i mean by this is , ok, for every file on your computer, you have an icon for it, and when you click it , it lookes like its dimmed. well, instead of showing the same icon dimmed when you click on it, i want it to show a totally different icon for the program that the code for this is in. so , basicly, i write the code to do this in visual basic, i then compile it, and now every time you click on the .exe file for this program, it shows the
other icon, and when its not highlighted, or being clicked it shows the other icon.

andymac
Jan 22nd, 2000, 03:41 PM
What you're essentially asking to do is if you click on your exe whilst it's sitting on the desktop or in exlporer (or wherever) to change it's icon so it shows something different. The grayed out icon is something that the system does, rather than an application providing the grayed out icon itself. You've got two options

(a) change the part of your EXE that has the icon resource compiled into it... (erm, don't do that !)
(b) hook into the system and when it tries to display your program (and only yours), to put a different icon up. Now there is a way of getting explorer to display the actual contents of a bitmap as the icon, but I suspect this is an undocumented feature of explorer (but it does work across the whole interface). Maybe that would be somewhere to start (except that I can't remember how you do it - it's a value to put into the registry)

Sorry, but I think this is the best you'll be able to get.

cheers

Andy

DiGiTaIErRoR
Jan 22nd, 2000, 04:56 PM
I've never seen this done....
Maybe it was an illusion?

------------------
DiGiTaIErRoR

Jan 22nd, 2000, 06:53 PM
I think however you do it "hooking" the system (i think I have a rough idea of what andymac meant) or whatever, you're going to have to have your program (or a seperate program to do it) running all the time. What I mean is that for your program to run any code (like changing an icon) it has to be running...when you click on an icon in explorer it DOES NOT run the program (well not unless you fancy adding some extra code to explorer!!) so no change icon code will run.

------------------
Matthew Ralston
E-Mail: matthew@ralston.net
Web Sites:My Home Page (http://www.matthew.ralston.net)

Sorry about my English, but my Scouse is dead good!