Solved

Change File Icon

Posted on 1997-07-30
2
160 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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now