Hello,
I am trying to figure out how I can programatically replace a folder's icon by clicking a button. i want to change it to an image I have created (type *.ico). Can anyone please help me
Thanks!
Hello,
I am trying to figure out how I can programatically replace a folder's icon by clicking a button. i want to change it to an image I have created (type *.ico). Can anyone please help me
Thanks!
How to replace a folder icon
robinjam
Thanks for that Johan - I think this would be more specific:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/custom.asp
Rob Coll
cool. Thats for all of your responses! So I think I will be able to do what i want at this point but I guess my only question at the moment is in VB, how would I be able to access a shell to type my 'attrib +s c:\changedicon' command
I would first use a streamwriter to create the file in the folder and track the path of where the file is created but I don't know how to make the folder a system folder.
Thanks for all the help!
giancolaj
do you know of a link that would possibly show how to alter the directoryinfo method I have found a link that shows how to view the items in a directory but now exactly for what I am trying to do. http://msdn2.microsoft.com/en-us/library/3xy7db0w.aspx
BigWinston
Ravonies
dberce1
nhaas
This also makes me concerned. Will this affect what i am trying to do
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx dg=microsoft.public.dotnet.security&tid=d11a479d-6453-4c70-8816-c15b2a3c844b&p=1
Ben S
I kind of know how to set File.setattributes but as far as the folder or directory attributes it seems very vauge to me.
netleon
http://msdn.microsoft.com/library/default.asp url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/icon.asp
Best regards,
Johan Stenberg
weeks61
xRuntime
Conde_tkd
I dont think you can change a folder icon in Windows as its part of a theme but I could be wrong.
I know you can do this in Windows, on a folder, go to Tools > folder options > File Types > select folder > change icon - it maybe possible...but you will be changing the Icon for the other icons also. I think to do this you would need to P/Invoke and use shell32.dll/user32.dll