Solved

Change File Icon

Posted on 1997-07-30
2
175 Views
Last Modified: 2006-11-17
Hello u all,
i am encrypting a file.  After Encryption I want to change the File Icon.  How do i Do it?
Then after decrypting the file I want to give the file its original Icon.  How do i do it.  
0
Comment
Question by:msali
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 5

Expert Comment

by:y96andha
ID: 1429007
You need to change the extension of the file. The icon of a file is mapped to its extension. If you're using 95/NT, the easiest way is to add an extension, like "readme.txt" -> "readme.txt.cry", and then set your desired icon for files with the cry extension. That way you'll just have to remove the .cry when decrypting it, and the original icon is back.
0
 
LVL 5

Accepted Solution

by:
y96andha earned 20 total points
ID: 1429009
I assume that you know how to create registry keys. Just att your extension to the HKEY_CLASSES_ROOT key with a default valu of your application name. Then add your application name as a key also under the HKEY_CLASSES_ROOT key and make a subkey named DefaultIcon containing the name of the file that contains the icon and the index of the icon.

You can look at for example the ".txt" extension that is already there.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question