I have a solution but it is not going to be pretty. First of all you need to download and install the windows api utilities. Goto the main NI page and in the search bar look for Windows API Function Utilities (32-bit) for LabVIEW. This will give you easy access to many windows functions. In particular it has a function for returning the window name which will be used.
Next you will need to open a new VI and place a call library node. Direct this node to system32\user32.dll and choose the function GetForegroundWindow . The msdn link for the function follows: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Windows/WindowReference/WindowFunctions/GetForegroundWindow.asp
Set the return ty
pe to be a 32 bit integer. Return to LabVIEW, and place Rename Window.vi from the utilities on the diagram. Create a control for the window handle on Rename Window.vi--this will be used to cast the integer from the library node into a LabVIEW reference that can be passed into Rename Window. To be clear the control you created will only be connected to the casting function. Lastly wire up a string indicator on Rename Window.vi. You can add bells and whistles but this will get you going.
I have attached a VI to fill in the gaps I left out of the description. Remember to get the Windows Utilities.