Jump to content

Force a LabVIEW popup to be the most front


Recommended Posts

General Details:

* LV version in use: 8.2.0

* In the code I'm using a few LabVIEW popus.

* I'm compiling the code on a "development" machine, and distributing the LV DLLs to "production" PCs.

* I have just added a new "production" PC with only the LV RTE installed. Clearly, I'm interested in running LV DLLs, and not the source code.

My test scenario is the following:

I have a home-made sequencer (similar to TestStand) which loads and runs my LV DLL.

The issue I was having is that when I ran my tests on that new "production PC", the LabVIEW popus would always be on the back of my sequencer (not the most front) . In my code, I was using the appropriate properties to enforce that the LV popup would run as the most front.

Well, the fix to this was a Windows registry setting:

My Computer/HKEY_CURRENT_USER/Control Panel/Desktop/ForegroundLockTimeout (set the value to 0 hex)

If you need more details you can find them on the web (google search, etc)

For LAVA gurus, are there any other known solutions to the issue I've described? I would rather stay away from making mods to the registry keys.

Link to comment

General Details:

* LV version in use: 8.2.0

* In the code I'm using a few LabVIEW popups.

* I'm compiling the code on a "development" machine, and distributing the LV DLLs to "production" PCs.

* I have just added a new "production" PC with only the LV RTE installed. Clearly, I'm interested in running LV DLLs, and not the source code.

My test scenario is the following:

I have a home-made sequencer (similar to TestStand) which loads and runs my LV DLL.

The issue I was having is that when I ran my tests on that new "production PC", the LabVIEW popups would always be on the back of my sequencer (not the most front) . In my code, I was using the appropriate properties to enforce that the LV popup would run as the most front.

Well, the fix to this was a Windows registry setting:

My Computer/HKEY_CURRENT_USER/Control Panel/Desktop/ForegroundLockTimeout (set the value to 0 hex)

If you need more details you can find them on the web (google search, etc)

For LAVA gurus, are there any other known solutions to the issue I've described? I would rather stay away from making mods to the registry keys.

Link to comment

QUOTE (crelf @ Jan 14 2009, 03:07 PM)

You can set the z-order to HWND_TOPMOST using user32.dll:

Hello Crelf,

I modified my windows registry, and put the default value back (not zero). Then I tried your suggestion, and in my case it did not make a difference, the pop-up was still shown running on the back of my sequencer.

I've tried several things: if I set the VI properties/window appearance to be shown when loaded this works. The issue here is that the entire VI front panel is brought to the front, this is not the behavior I'm after, I only want the pop-up shown.

Regardless, thank you for the suggestion.

Link to comment

QUOTE (crelf @ Jan 14 2009, 03:07 PM)

You can set the z-order to HWND_TOPMOST using user32.dll:

Hello Crelf,

I modified my windows registry, and put the default value back (not zero). Then I tried your suggestion, and in my case it did not make a difference, the pop-up was still shown running on the back of my sequencer.

I've tried several things: if I set the VI properties/window appearance to be shown when loaded this works. The issue here is that the entire VI front panel is brought to the front, this is not the behavior I'm after, I only want the pop-up shown.

Regardless, thank you for the suggestion.

Link to comment

QUOTE (nitulandia @ Jan 15 2009, 10:09 AM)

The issue here is that the entire VI front panel is brought to the front, this is not the behavior I'm after, I only want the pop-up shown.

Do you know what the pop-up window's title is? If so, use it. If not, try to find what the hWnd is.

Link to comment

QUOTE (nitulandia @ Jan 15 2009, 10:09 AM)

The issue here is that the entire VI front panel is brought to the front, this is not the behavior I'm after, I only want the pop-up shown.

Do you know what the pop-up window's title is? If so, use it. If not, try to find what the hWnd is.

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.