Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Changing icons for Shortcuts

Posted on 1998-03-10
7
Medium Priority
?
619 Views
Last Modified: 2008-02-26
I am creating Desktop shortcuts for an Access97 application using fCreateShellLink from STKIT432.dll.  The problem is that it creates the shortcut using the Access97 icon rather than my program icon.  How can I change the icon for the shortcut?  From what I have read, I would have to use the IShellLink interface, but I haven't been able to successfully implement it.
0
Comment
Question by:mikk7
[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
7 Comments
 
LVL 1

Expert Comment

by:cbeattie
ID: 1970410
I may be misunderstanding the question, but I think you should be able the edit the desktop shortcut like any other.  Once the icon is there, right click the icon, select properties, and the shortcut tab has a button for "change icon".
0
 

Author Comment

by:mikk7
ID: 1970411
I need to change the icon programmatically.  This shortcut will be placed on the desktop after installation.
0
 
LVL 27

Expert Comment

by:aburr
ID: 1970412
Find the Access 97 icon, rename it, substitute your own icon
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Author Comment

by:mikk7
ID: 1970413
When I check the icon properties, %SystemRoot%\system32\SHELL32.dll is listed as the icon.  Even if I could find the access icon, I wouldn't want to change it because some users have Access 97 loaded on their computers.

What I'm looking for is a function like fCreateShellLink that allows me to specify the icon or a way to implement iShellLink, which opens up all of the properties of the Shell Links.
0
 
LVL 3

Expert Comment

by:hkp
ID: 1970414
You  are talking about a specific DLL, and a specific Interface in some COM-enabled language... Right?

There's no way to get a particular icon referenced from a multiple icons DLL. You have to point it out, manually, then you can copy the shortcut to where you need it.

You could extract the needed icon from the STKIT432.DLL, and then refer directly to it from the "Change Icon" Dialog Window.
This solution gives you any icon you want.

To be able to extract the icons from a DLL or EXE file, there are some icon managers around. Try the following URL for a download: http://www.risoftsystems.com/iclbuild.asp


0
 

Author Comment

by:mikk7
ID: 1970415
The icon I want is not in a multiple icons dll file.  I have an ico file for it.  The problem I'm having is how to get the icon (or any) property of the .lnk file.
0
 
LVL 3

Accepted Solution

by:
hkp earned 200 total points
ID: 1970416
Why don't you look at the file with "debug"?

By looking at a .lnk file or two I found that the position 56 in decimal holds the current icon number amongst the icon ressources in the given .exe file, or .dll file.

The position 64 hold the ASCII value of the short cut key
position 65 has bit 0 set if shift is used in the short cut key
position 65 has bit 1 set if ctrl is used in the short cut key
position 65 has bit 2 set if alt is used in the short cut key

By continuing to experiment you can probably find out how the .lnk files are organized, and then you can obtain your needed information.

The last string in the .lnk is the host file for the icons

Now, I can't get you closer, sorry. Btw, programming can do the rest of the job.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

704 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