I need to programmatically force my LabVIEW application to become frontmost on a Windows system. Basically I want it to punch through any currently open application windows and become the main active app.
What I've tried:
I ran the SetForegroundWindow Windows API function. This causes the titlebar to flash and draw attention for a short while but does not make it frontmost.
I ran the BringWindowToTop Windows API function. This does not make it frontmost.
I made my application window floating. This does appear to work. However this causes other problems since the window which I need to be frontmost is also a dialog box. So I don't want the user to click behind the dialog box onto my main application window.
I tried using the floating window property (as mentioned above), then quickly made it modal again. This has the affect of flashing the window to the user and then disappearing behind any other app windows. Not good and also confusing.
So, is there any way to do this?