473,569 Members | 2,782 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 7389
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
3126
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....
1
2632
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
23801
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
14390
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
5685
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 ...
1
1471
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
7527
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
1662
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...
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
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. ...
0
8120
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...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
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...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
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
0
937
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...

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.