?
Solved

Change File Icon

Posted on 1997-07-30
2
Medium Priority
?
182 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 80 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

770 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