Change shortcut icon

  • Thread starter Thread starter Erel
  • Start date Start date
E

Erel

Hi,
Is it possible to change the icon of a shortcut file (".lnk") with .Net
CF?
And an ".exe" file?
Thanks,
Erel
 
I'm not aware of any way to do that. Certainly, a shortcut to an EXE
chooses the same icon as is used for the EXE itself, which is chosen based
on the IDs of icons that might be stored in the EXE file itself. Icons for
documents are controlled via the registry, so you could change the icon used
for a .doc or a .txt file, but that's not the same thing. Sorry. Why do
you want to do this?

Paul T.
 
So how can I change the icon for an EXE file?
I need it for a development program I'm developing (Basic4ppc).
Thanks,
Erel
 
I don't know what a Basic4ppc is, but, if you put an icon with a 32x32
version, 16 colors, and a 16x16 version, 16 colors, in the EXE, the system
should use it. Set it to be icon ID 101, if you want to match what some of
the tools do.

Paul T.
 
Thank you for your help.
Can I put more than one icon in the EXE file and allow the user to
change the icon?
Erel
 
No, or at least not exactly. I don't see the use for any of this. Tell us
*what*, not *how*, you are trying to do something. I can see plenty of
reasons to display different icons to represent things, but not shortcuts in
the shell.

Paul T.
 
I'm developing a program that allows other users to develop their own
applications.
You can see http://www.basic4ppc.com for more information.
This program creates a shortcut in the Programs section that launches
the main application and includes the user application as an argument.
I want to allow the users to change the shortcut icon.
The best method as I see it (but probably not possible) is to change
the shortcut icon.
Another solution is to change the main application icon (EXE file).
Thanks again,
Erel
 
I can't think of any way that you can accomplish that. The same was true of
eMbedded Visual Basic applications, back in Windows CE 3.0. The way this
was worked around, at the time, was generating a small C-based EXE which
would, in turn, launch the pvbload.exe program with the .VB file on the
command line. So, your code would have to generate an EXE with the right
icon in it to go with each user-generated program (the setup program could
install both).

Paul T.
 
Back
Top