I have a multi-threaded app with two main windows. One is the data display / main user interface event handler. The other is a seperate window with nothing but the menu bar--basically categorized commands that may be executed independent of what the main user interface is doing. This way I can move the commands around, hide them, etc--they are seperate.
From the user interface I am running a script. At first the sub-vi that ran scripts was a modal 'Cancel' button to end the script and return to the user interface. The modal property kept the user from doing anything with the user-interface while the script was executing. Perfect. The problem is, it also kept the user from accessing the command window. So I changed the scri
pt from a modal dialog box to a non-modal pop-up window that i set to Always-on-Top. This allows access to the command window and keeps the 'Cancel' button on top so it won't disappear behind the user interface if the main window gets clicked. Also, the user interface remains locked out because the script sub-vi is called from the user interface event handler.
The problem I have is that clicking on the main user interface (for example, selecting a different tab to view) while the 'Cancel' button dialog box is visible, does nothing. When the dialog box exits however, all of the clicks done previously (which you'd think would have been forgotten), get propogated. The application goes haywire momentarily trying to change and update things. If you clicked five different tabs while the dialog box was open, it would do nothing, then all of a sudden (when the dialog box exits), flip rapidly between the five different tabs selected, as fast as possible.
Is there any way to cancel
or ignore these mouse click events that get sent to the main user interface? Is this a problem with the windows Always-on-Top setting?