Jump to content

Popup on top


Recommended Posts

I have written a time tracking application (Application Builder in LV 7.0) which works well enough. It has a (configurable) 'reminder' function which pops up a small window, asking whether to continue tracking the task or not. The popup counts itself down to zero and closes if no response is given. This is in case I leave the computer and forget to shut off the tracking manually.

The problem is that I cannot ensure that the popup window will open up on top of whatever program it is that I may be working on. In this case, it times out and shuts off the tracking function in the main app - behind whatever I'm working on.

I'm using an Open VI Reference and a Property Node (w/ FP.Open & FP.IsFrontMost True) to try and open it on top. The IsFrontMost property notes that "Setting this property will wait until the user interface is not busy". The meaning of this note isn't clear to me.

I have tried, unsuccessfully, to have the popup itself continuously calling the IsFrontMost property on it's own reference, but either I'm calling it incorrectly or it doesn't work that way.

I'm going to explore the 'events' functions in order that the main app doesn't bother to call the popup if there's any activity on the computer, but I would still like to be able to place the popup on top.

Any help is appreciated.

Thanks,

Jeff :headbang:

Link to comment

You can't do this using any of the built-in LabVIEW functions or capabilities. For this to work you need to make a call to the user32.dll in Windows. There is a collection of VI's available from many sources that will do this for you. Here is a link to NI's site where you can get them:

Windows API Function Utilities (32-bit) for LabVIEW

In any case, I've put together a LV7.0 version of a VI that will do exactly what you ask. I've attached this.

Download File:post-19-1083913103.llb

Link to comment

Thanks Michael;

I did find that set of utilities after posting the question. In experimenting I found that yes, the window will popup over all other LabView windows but will not popup over any other applications running. This seems to be exactly what happens with your vi as well. I compiled your vi to an executable and tried it again, in case that changed the behaviour - but it didn't.

I'm running Windows 2000 if that has any bearing.

Jeff

Link to comment
I found that yes, the window will popup over all other LabView windows but will not popup over any other applications running. This seems to be exactly what happens with your vi as well. I compiled your vi to an executable and tried it again, in case that changed the behaviour - but it didn't.

Windows 2K should not matter and running an executable should not matter as well. This is strange, I've never had a problem with this method on any platform. I'm not sure what is different on your computer. You should try this on another machine and see it it has the same behaviour.

Since you have all the utilities, you will see another one called: make window always on top. This will make the widow frontmost always even if you click another app. Try this one and let us know.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.