drjdpowell Posted October 24, 2019 Report Share Posted October 24, 2019 Here is something that I often have problems with and have no good solution: Often I have floating or modal windows, and another modal window opens (either from the VI that is the first window or another async-running component) and the active modal window ends up behind the first window. Often this second window is the file dialog. The User ends up unable to click on the active modal window, and unable to move any other LabVIEW window. They think the application has hung, which effectively it has. Really, of course, I want the active modal window (that is blocking the User from all other windows) to always be on top. How do other people get around this problem? Quote Link to comment
bmoyer Posted October 24, 2019 Report Share Posted October 24, 2019 Sorry, I don't have an answer, but I encountered this problem very recently (it was brought to my attention yesterday!). I don't remember making any changes, it was the NI 3-button dialog getting stuck behind another dialog. I just re-built the exe and it worked so problem solved! (until it comes back on the next build) I'm using LV2017SP1f3. You would think that the most recent modal window would be of higher modality than the previous. Quote Link to comment
Tim_S Posted October 24, 2019 Report Share Posted October 24, 2019 Stopped having that issue once went to using win32 calls to make window frontmost and always on top (which has created new issues). Seems like would either hide the window while the file dialog was running or make the VI not modal while the file dialog was called. Quote Link to comment
andre@carya Posted October 28, 2019 Report Share Posted October 28, 2019 I typically try to avoid a UI design that could get in that state. When modal dialog pops-up it should typically be the interface the use needs to handle before be able to do other stuff in the application. Most application I write nowadays use subpanel constructs for the main UI and only pop-up dialogs "modal" in case it's something that needs to close before doing anything else or float mostly in case of an additional information windows (mostly debug/trace type). User workflow should be a simple for the user as possible, logical flows. Quote Link to comment
Gribo Posted October 28, 2019 Report Share Posted October 28, 2019 I use the Win32 call to bring the current window to the front. LV's bring to front doesn't always get the desired result. I avoid LV's Modal windows, mainly because other Win32 windows might be on top of them. If I do use a pop-up panel, it will have that Win32 call in the timeout event handler. It is annoying to the user, but its the only way I can be certain the user sees the window. Quote Link to comment
Zou Posted October 30, 2019 Report Share Posted October 30, 2019 Use .Net OpenFileDialog (or Windows API GetOpenFileName) where you can specify the owner window. The dialog window will be in the front of its owner window. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.