LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change Windows Title in run-time

I can change windows title in File-->VI Properties--< Windows Title.

I wish You write in a string box change the windows title. How can i made it?

Thanks.
0 Kudos
Message 1 of 6
(4,767 Views)
Hello Carlos,

just use the property node "Front Panel Window:Title".
Open a reference to the vi ("current vi's path" -> "open reference") and wire that to a property node. Select property "FP.Title" and wire your string box. That's it (and works also in executables).

Bets regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(4,767 Views)
Hi,

In addition, make sure you close the reference! Normally, LV isn't very
picky when it comes to internal references, but when you change a window
title, the new and old reference seems to stay in memory. You will get
memory leaks (until the vi stops, then it is released).

Regards,

Wiebe.


"GerdW" wrote in message
news:50650000000500000018D90100-1079395200000@exchange.ni.com...
> Hello Carlos,
>
> just use the property node "Front Panel Window:Title".
> Open a reference to the vi ("current vi's path" -> "open reference")
> and wire that to a property node. Select property "FP.Title" and wire
> your string box. That's it (and works also in executables).
>
> Bets regards,
> GerdW
0 Kudos
Message 3 of 6
(4,767 Views)
Hello Wiebe,

what do you mean with new and old reference? Does the reference of the vi change, when you change the FP.Title property?
I have a vi, that runs as long as I'm sitting in front of my computer (say 10 hours a day). It sets the title every 90 seconds to signal running processes in Windows taskbar. I close the reference on vi exit and never realize some memory leaks.

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(4,767 Views)
GerdW,

If you open a reference, and then, in a loop, change the title, there is no
problem.

But if you open a reference and change the title in a loop, you get problems
when you don't close the reference. This does not happen when you don't use
the Open VI Reference.

The attached VI will hopefully clear things up...

Regards,

Wiebe.


"GerdW" wrote in message
news:5065000000050000001FD90100-1079395200000@exchange.ni.com...
> Hello Wiebe,
>
> what do you mean with new and old reference? Does the reference of the
> vi change, when you change the FP.Title property?
> I have a vi, that runs as long as I'm sitting in front of my computer
> (say 10 hours a day). It sets the title every 90 seconds to signal
> running pr
ocesses in Windows taskbar. I close the reference on vi exit
> and never realize some memory leaks.
>
> Best regards,
> GerdW



[Attachment Change Title Leak.vi, see below]
0 Kudos
Message 5 of 6
(4,767 Views)
Hello Wiebe,

good example, now your answer is clear.

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(4,767 Views)