Jump to content

Problem of the Modal Dialog behind another window


Recommended Posts

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?

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

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. 

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.