LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Icon in LabVIEW Title bar of a '.vi'

Hi,
There are methods to change the LabVIEW Program Default Icon in Application Builder.
 
Is there any way to change the '.vi' Title Bar Icon while in run time.
Clearly, when you run a 'vi' program, before making into a application, is there any way to change the title bar icon?
 
Soundar
Message 1 of 23
(17,682 Views)
hello,

I can only help on changing the title bar. See the attached picture.

But let me give you some tips on the other points:
-"There are methods to change the LabVIEW Program Default Icon in Application Builder."
I think that you mean the icon for the .exe that you create. When you create the .exe, in the icon step, you see the 3 resolutions. I think that you must create an icon that match those values. I've already made it. But now I can't explain you more.


Software developer
www.mcm-electronics.com





PORTUGAL
Message 2 of 23
(17,665 Views)

Hi,

I would like to change the icon of a vi program and not in exe. When you run a LabVIEW program, the title bar icon should change. And when you stop the 'vi', the title bar icon can become defaut LabVIEW icon.

Soundar

Message 3 of 23
(17,661 Views)
Hi soundar,

open a vi reference, wire it to an 'invoke node' and then you will see two methods: 'Get vi icon as image data' and 'Set vi icon from image data'.

Use them as needed!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 23
(17,656 Views)

Hi GredW,

This will chage the connector pane icon and not the title bar icon. Connector Pane icon you can get or set programmatically. I want to change the titlebar icon.

In VB or VC++, there is a option in Project Properties, where you can change the icon of the forms/windows. that will reflect when you run.

Such kind of changing Title bar icon at run time is required.

Soundar

Message 5 of 23
(17,647 Views)


@Soundar wrote:

In VB or VC++, there is a option in Project Properties, where you can change the icon of the forms/windows. that will reflect when you run.


I believe that's because Visual Studio creates a new window for the form when you run the application (since until then it's inside the tabbed interface of the IDE itself). In LabVIEW, the window for the front panel remains the same and is owned by the IDE. LV itself does not have a way of changing this, but maybe the Windows API does allow you to change the icon on an existing window.

Personally, I don't find this to be unreasonable behavior. If the VI is run from LV itself, it will usually mean that the developer is the one running it, and the developer does not need to have the custom icon.

When the program is run as an executable, of course, it does use the icon you provided.


___________________
Try to take over the world!
Message 6 of 23
(17,635 Views)
There is a windows API SetClassLongA that can change the icon of the windows class. But all LabVIEW windows use this class, so all the LabVIEW windows will change to this icon. If this is what you want let me know, I can post a vi (but I'll have to log in to the web interface, I'm using Outlook).


Regards,


Wiebe.
Message 7 of 23
(17,606 Views)

Does someone has solution for the above problem......

 

 

Regards

0 Kudos
Message 8 of 23
(16,997 Views)
To which problem? To being able/not being able to change the little icon in the title bar programmatically, or how to use the Windows API to change the icon (even though as pointed out it's likely to change all of the windows)? Personally, I would have to agree with tst, as I don't see the need or point of doing this in the development environment. It was never clear from the original post why this was desired. Could you provide a reasoning for why you need to do this? Is there something you're trying to debug? Perhaps there's an alternative way of doing this.
0 Kudos
Message 9 of 23
(16,947 Views)

Dear  smercurio_fc

 

Actually i have to change the labview icon on the final software that will be provided to the customer. so can you provide solution for the above.

 

I have one more problem, can i customize the tool bar (add buttons or leds) or can i add a new tool bar?

 

Thanks for replying

 

Reagards,

 

Shrekt

0 Kudos
Message 10 of 23
(16,906 Views)