Solved

Change File Icon

Posted on 1997-07-30
2
165 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
  • 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

778 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