?
Solved

Change File Icon

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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

809 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