Jump to content

How to fetch a reference to the current window?


mefix

Recommended Posts

Hey LV-fellows =)

I am working on some kind of daemon that allows me to stop/start/restart VIs.

Can anyone tell me how i can get a reference to the currently active (frontmost) window?

Tried to use the call-chain, which didn't work proberly.

Another question is how to set a window "always-on-top"? Does "Floating" mean "always-on-top" ... "modal" disables me from using other VIs in background... ?

--> LV7.1 PDS

perhaps someone can help me in the above mentioned topics.

greetz

mefix

Link to comment

There is a Vi in the OpenG palette

Get Frontmost VI.vi - Gets the name of the fronmost VI

btw thanks to Jim Kring for the VI. ;)

You do not have the openg library,

download the OpenGCommander openg.org and install the application control package.

For your second question

Lets have a look to the labview help Index window, appearance options. :clock:

Window Behavior

Link to comment
Another question is how to set a window "always-on-top"?

5212[/snapback]

You need to use special calls to set a window always-on-top or not-always-on-top. There's a package with windows manipulation functions already put into LabVIEW wrapper VI's that calls LVWUTIL32.DLL (which you can search for). Here's the link I found even though I'm not sure it's the most recent--maybe someone knows where a more recent link is.

http://digital.ni.com/public.nsf/websearch...6256c3f006ee656

Link to comment
You need to use special calls to set a window always-on-top or not-always-on-top.  There's a package with windows manipulation functions already put into LabVIEW wrapper VI's that calls LVWUTIL32.DLL (which you can search for).  Here's the link I found even though I'm not sure it's the most recent--maybe someone knows where a more recent link is.

http://digital.ni.com/public.nsf/websearch...6256c3f006ee656

5215[/snapback]

This really depends on the version of LabVIEW you have. LabVIEW 7.0 and higher has a property FP.Behaviour which allows setting this at your whim directly. Earlier LabVIEW versions do need the Windows library, unless you have LabVIEW 6.1 and play with the ini file in ways as described in the scripting section.

Rolf Kalbermatter

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.