473,698 Members | 2,833 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change Folder Icon Programmaticall y

Hi,
I can change the icon for a folder by right clicking on it > going to the
customize tab > and selecting Choose Picture.
Does anyone know if it is possible to do this programmaticall y from a
windows forms application?
Thanks
Phil
Nov 21 '05 #1
16 7407
Phil Hey wrote:
Hi,
I can change the icon for a folder by right clicking on it > going to the
customize tab > and selecting Choose Picture.
Does anyone know if it is possible to do this programmaticall y from a
windows forms application?
Thanks
Phil


Maybe if you change the registry entry at:
hkey_classes_ro ot\folder\Defau ltIcon

That where I think the icon definition is stored.
--
Rinze van Huizen
C-Services Holland b.v.
Nov 21 '05 #2
Phil Hey wrote:
Hi,
I can change the icon for a folder by right clicking on it > going to the
customize tab > and selecting Choose Picture.
Does anyone know if it is possible to do this programmaticall y from a
windows forms application?
Thanks
Phil


Maybe if you change the registry entry at:
hkey_classes_ro ot\folder\Defau ltIcon

That where I think the icon definition is stored.
--
Rinze van Huizen
C-Services Holland b.v.
Nov 21 '05 #3
> Maybe if you change the registry entry at:
hkey_classes_ro ot\folder\Defau ltIcon

That where I think the icon definition is stored.
--

Yes, but I dont want to change all the folders just certain ones, thanks
anyway

Phil
Nov 21 '05 #4
> Maybe if you change the registry entry at:
hkey_classes_ro ot\folder\Defau ltIcon

That where I think the icon definition is stored.
--

Yes, but I dont want to change all the folders just certain ones, thanks
anyway

Phil
Nov 21 '05 #5
Phil Hey wrote:
Maybe if you change the registry entry at:
hkey_classes_ root\folder\Def aultIcon

That where I think the icon definition is stored.
--


Yes, but I dont want to change all the folders just certain ones, thanks
anyway

Phil

I don't think you can since Windows displays the icons according to
filetype. A folder is just a folder to Windows. So it will look up the
icon there and display it. Just like you can't display icon A for one
textfile(.txt) and icon B for another textfile(.txt). So unless you make
a shortcut and change the icon of that I can't see a way.

I might be wrong though, in that case I would love to see how it's done :)
--
Rinze van Huizen
C-Services Holland b.v.
Nov 21 '05 #6
Phil Hey wrote:
Maybe if you change the registry entry at:
hkey_classes_ root\folder\Def aultIcon

That where I think the icon definition is stored.
--


Yes, but I dont want to change all the folders just certain ones, thanks
anyway

Phil

I don't think you can since Windows displays the icons according to
filetype. A folder is just a folder to Windows. So it will look up the
icon there and display it. Just like you can't display icon A for one
textfile(.txt) and icon B for another textfile(.txt). So unless you make
a shortcut and change the icon of that I can't see a way.

I might be wrong though, in that case I would love to see how it's done :)
--
Rinze van Huizen
C-Services Holland b.v.
Nov 21 '05 #7
Phil Hey wrote:
I can change the icon for a folder by right clicking on it > going to the
customize tab > and selecting Choose Picture.


I think if you have an image inside the folder called folder.jpg Windows
will automatically use this for the folder image. You could copy this in
in your code. Not sure if this helps at all.
Nov 21 '05 #8
Phil Hey wrote:
I can change the icon for a folder by right clicking on it > going to the
customize tab > and selecting Choose Picture.


I think if you have an image inside the folder called folder.jpg Windows
will automatically use this for the folder image. You could copy this in
in your code. Not sure if this helps at all.
Nov 21 '05 #9
Rinze Wrote:
I don't think you can since Windows displays the icons according to
filetype.
You can definatelly do this (manually at least) for individual folders
rather than all folders as i am looking at an example of this now. Maybe if
I explain the situation it will help:

I have a drive on the server called Jobs (j:) in this drive I have folders
for each of the jobs lablled 'J1194' for example. When, in my application, a
job is made in-active i want this folder to appear with a red cross through
it to in dicate that it is closed.

elzico wrote: I think if you have an image inside the folder called folder.jpg Windows
will automatically use this for the folder image. You could copy this in
in your code. Not sure if this helps at all.


Ok, I have tried this and it works but only if you are viewing the folders
in Thumbnail view not in any of the other views.

Anyway thanks for the help

Phil

Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3131
by: Barry Edmund Wright | last post by:
Problem when using Xp Packaging Wizard and the database being able to find the Application Icon after database is deployed. Under Menu/Tools/Startup form I have: Application Icon: c:\vms\handshak.ico Unfortunately, when I use the Xp Packaging Wizard the default folder it uses to install the database vms.mdb is c:\program files\vms. Therefore when the database is started it can't find the handshak.ico in the directory c:\vms because it...
1
2646
by: Alice | last post by:
Hi all How can i change the status bar icon for my website Or The icon shown in user's Task Manager for the browser process fetching my website Thanks in Advance Alic
4
23827
by: Dan Sikorsky | last post by:
How do you set the this.Icon property of a windows form to the App.ico file specified in the Project Properties? I don't want to type in the path and filename; I want to set the form's icon programmatically in the Form Load section. -- Thank you kindly, Dan Sikorsky MSCS, BSCE, BAB
4
14401
by: yxq | last post by:
Hello I found a icon Class, i have tested the code, it can get file and drive icons, but not folder icons, How to get a folder icon? Thanks ************************************************************************* '=========================================================================== ========== ' clsIcon
0
340
by: Phil Hey | last post by:
Hi, I can change the icon for a folder by right clicking on it > going to the customize tab > and selecting Choose Picture. Does anyone know if it is possible to do this programmatically from a windows forms application?
0
5689
by: nkotbox | last post by:
I have this script to enable/disable my wireless nic on my laptop. Is it possible for the scripts icon or shortcut to the script to change icons depending on whether or not the nic is enabled. So if the wireless nic was enabled then the script icon would be my on.ico and if it were disabled the the icon would be my off.ico heres the script Const ssfCONTROLS = 3 sConnectionName = "wireless network Connection" sEnableVerb = "En&able" ...
1
1472
by: Avnish | last post by:
In my c-sharp project, how can i change the application icon property programmatically depending on the configuration selected. i.e. i want to give different icon file path to the application target file based on the configuration selected. Plz give an example. Or how can i change the application file (exe file) icon using command line.
3
7559
by: faraz | last post by:
I have set the exe icon from Project Properties->Application->ico. now i always have the same icon on the exe. how can i change the icon of exe programmatically?
4
1670
by: mikkoO8 | last post by:
hi. im actually making a desktop cleaner that can move the files and icons to a folder inside the listview box. i can make the listview box filled with files contains at the desktop and i can make a new folder which suppose to be move the files on that folder i have 3 problems: 1. is how to get last access time of the FILE and put it column2 of the listview 2. i want to view that are unused icon and document last week, 2weeks, 1month...
0
8611
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4624
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2341
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.