Jump to content

Use of VI Icons as EXE Icons


Recommended Posts

Application builder has provisions for using a custom icon file (*.ico) for your built EXEs. To build these "*.ico" files, one would have to have a program capable of providing such files.

It would be neat to have Application builder automatically use the top level VI's icon as the icon for the exe, OR have a utility built into LabVIEW that allows you to create your own custom EXE icon.

Link to comment
Application builder has provisions for using a custom icon file (*.ico) for your built EXEs.  To build these "*.ico" files, one would have to have a program capable of providing such files. 

It would be neat to have Application builder automatically use the top level VI's icon as the icon for the exe, OR have a utility built into LabVIEW that allows you to create your own custom EXE icon.

2136[/snapback]

:yes:

Link to comment
  • 2 months later...

It seems like with scripting we could now add the ability to save a LabVIEW icon as an ICO file. The ICO file format is known and we can now get references to the VI icon and connector pane, etc, along with the images, etc.

It might be doable without to much effort, but I wonder if that is in the pipeline for LV 8? I have heard that NI is working on a lot more project type tools, but I don't know what versions they are expected to debut in.

Link to comment
  • 1 month later...
  • 3 weeks later...
I'm waiting for this little feature since LV 4.

Maybe be, someone has a good description of the .ico-File,

that we can write a VI to

Read a selectable VI-Icon

Convert it to .ico-format

save as...

With LabVIEW 7.0 this is basically no problem. The functions to deal with .ico files are available in LabVIEW since about 6.0. Checkout vi.lib/platform/icon.llb. That are the same functions used by the application builder to read ico files as well as replace icon resources in the build executable. In LabVIEW 7.0 you also have a VI server method to retrieve the icon of a VI. Together these two things are all which are needed.

There are however a few fundamental problems. The function to replace icon resource data works directly on the executable image (well really on the lvappl.lib file, which is an executable stub which is prepended to the runtime VI library and which locates the correct runtime system and hands the top level VI in that library to the runtime system). As such it can only replace already existing icon resources as doing otherwise would require relocating the resource table and its pointers, an operation which is very involved and error prone. Windows itself doesn't have documented API functions to store resources into an executable image, as this is a functionality not considered necessary for normal applications.

lvapp.lib contains only icons for 16 color and 2 color icons for the size 16*16 and 32*32. Wanting to be able to have other icons would mean to add first those resolutions and sizes to lvapp.lib and improving the icon functions in icon.llb to properly deal with those extra resolutions. This is not really difficult to do.

A different problem is that LabVIEW icons are always 32*32 pixels whereas Windows really needs 16 *16 pixel icons too, for displaying in the left top corner of each application window as well as in detail view.

Rolf Kalbermatter

  • Thanks 1
Link to comment
lvapp.lib contains only icons for 16 color and 2 color icons for the size 16*16 and 32*32. Wanting to be able to have other icons would mean to add first those resolutions and sizes to lvapp.lib and improving the icon functions in icon.llb to properly deal with those extra resolutions. This is not really difficult to do.

4039[/snapback]

Did you do it? If yes, have you a modified lvapp.lib or how did you made it?

I know Microangelo, where one can retreive/modify the icon's in any executable. But unfortunately after modifing something the executable is broken.

Didier

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.