UI Interest Group Blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Change the icon of a single front panel window

Trusted Enthusiast

For a good looking GUI, it might be nessecary to have multiple window icons in one applicatino, for this purpose I have created a tool-vi that uses the windows API with the WM_SetIcon message and the LoadImage method to change the icon of a single VI front panel window:

SetWindowIcon.png

With this VI you can change the icon of a single front panel window, here's alittle video showing this feature

Hope you enjoy this little tool, if you have the possibility to test/alter the VI for Windows 64-bit, Mac or Linux, please post your updates!

EDIT: There was a small bug in the program that caused it to work for only one VI at a time, now it works for multiple VIs, you can set and reset at any moment you want, the tool should remember what the original icon should be. It is not advised to multiple times use a set and then use a reset.

To use this tool you'll need to have the OpenG Application Control toolkit installed.

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Comments
Member

Cool!

Tested it on LV2009SP1 x64 development environment under Windows 7 and works like a charm.

I guess you should make the VI reentrant (pre-allocate clone) though, so you can actually use it for setting and resetting the correct icon for multiple windows within your app.

Trusted Enthusiast

Jeffrey,

there was a minor bug, I've updated the VI and I can manage multiple VIs

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Member

Ah yes, I see.. I actually overlooked you doing the lookup thing. No need for reentrancy.

You could get rid of the while loop though.

Member

Hi Jeffrey;

I try to use your vi, but I don't have the Built Error Cluster_ogtk.vi, Current VIs Parents Ref_ogtk.vi, I'm using Labview 2011 W7 64, you can send my these?

Active Participant

Joju,

These VIs are part of OpenG.  You can get them for free through the VI Package Manager.

Member

Thanks; Jeffrey and MatthewKelton, I installed the OpenG, and work perfectly

Member

Hi, could you please this vi in version 8.5 ? Many thanks

Vincent

Trusted Enthusiast

I added a version for LV 8.0

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Member

Thanks a lot for the 8.0 version.

Member

This works great on LV 11 running Win 7.