LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Icon Resources to a LV-built Executable

Hi Yamaeda

Yes true enough, but it's very limited and from what I can see you can't take a 256 image and easily resize for 48,32,16 you have to redraw each time. Smiley Sad

 

0 Kudos
Message 11 of 15
(598 Views)

Yes the distributed icon editor that comes with LabVIEW is an old LabWindows/CVI program. At that time 256 color icons and 32*32 pixel icons where about the hottest thing Windows would support. I'm still not sold on 48*48 or 64*64 to be necessary in any way nor do I see a lot of use for 10 million color icons.

 

That said the registry association as used in Windows definitely allows to define for each filetype an individual icon. The problem here is that there are several possibilities to define such icon associations and they all involve a multi stage setup.

 

The original principle is that you define a file extension specification in HKR\.<your file extension> whose key value defines a filetype name. Then the key value for  HKR\<filetype name>\DefaultIcon contains the path to the icon resource. This can be directly an icon file somewhere in the file system or it can point to a dll or exe file, with an appended icon resource ID after a comma.

It's definitely NOT necessary (but possible through a resource compiler or editor) to add the icons to your built executable as the path can also simply point to an icon somewhere in the filesystem, such as an icon file in a support directory in your application installation directory.

Under HKR\<filetype name>\shell you have a list of keys which define different actions by well know verbs such as open, print, etc. Under there you have another key with the name "command" whose value defines the shell command to execute with the filepath of the executable to use, or optionally a registered ClassID instead which must be present elsewhere in the registry for the actual executable. The value %1 in the command is replaced with the file name that was activated by the user.

 

It's not exactly rocket science to figure out by simply looking at the filetypes LabVIEW registers for its own filetypes but it is definitely approaching relational database complexity Smiley Very Happy

Rolf Kalbermatter
My Blog
Message 12 of 15
(592 Views)

@NeilR wrote:

Hi Yamaeda

Yes true enough, but it's very limited and from what I can see you can't take a 256 image and easily resize for 48,32,16 you have to redraw each time. Smiley Sad

 


Yes, true. 😕 The resizing i do in e.g. GIMP and simply copy/paste the buffer. You can technically create icons in GIMP but it has some issues of its own.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 13 of 15
(577 Views)

For icon creation I've found IcoFX is good (version 1.6 is freeware, current versions are paid). It can generate all icon colour + size combinations from a single image in one batch process. The results are good enough for 48x48 and most 32x32, but some 32x32 and 16x16 icons may need some hand edits depending on the source image.




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
Message 14 of 15
(551 Views)

Hi,

This is the last post of Mike Porter, and his super cool blog named notatamelion is down.

Does anyone has any news of him ?

Thx,

0 Kudos
Message 15 of 15
(511 Views)