Jump to content

Executable window title - can be changed?


Recommended Posts

Hi all, after making the forehead-slapping discovery that it is possible to run multiple instances of a LV compiled executable using a ini setting, I've run into a small issue. If for some reason you need to kill off (or check memory usage etc in) one of the running instances you can't tell which is which in Task Manager.

So I thought easy fix, just change the window title using the VI FP.Title property to something specific to each instance. But this doesn't get picked up by task manager - it seems to use the executable name as the title.

So does anyone know if there is a way around this? Maybe some property that I'm overlooking?

Link to comment

An interesting idea that I hadn't thought of! So I guess the 'task killer' would do the following:

1) Enumerate all running processes

2) Somehow probe each process with VI server to see if it is a LV built executable

3) Then get the VI title if it is a LV built executable

4) Then allow the user to kill the process

Steps 2) and 3) I'm a little hazy on - this would mean that all built executables would have to have the LV server enabled and running, along with a 'stub' VI exposed that could be called. And I'm not that that a call to the embedded LV server would work if the process is already locked up (which is why it has to be killed). Anyone have any comments on this?

I think the that simply being able to change the name of the process shown in task manager would be far simpler - it must be possible as programs like MS Word can do it - the name of the active open doc shows in task manager.

Link to comment

This seems to be a Windows issue, so searching for what the standard method of doing this is would be a good start.

For example, a very quick Google search shows this and this. I don't know if those would work (for example, the first one requires a callback function, which I don't know if you can use, but you might be able to work around that using FindWindowEx).

Anyway, there might be some other methods (through .Net, for instance). If you come up with something, it would be nice to see.

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.