Prompting Users with Dialog Boxes in a Mouse Down? Event Case

Event cases that prompt users with a dialog box can cause unexpected behavior in the VI. For example, if you use a Mouse Down? event with a numeric control and configure the event case to prompt you with a dialog box, the Event structure responds when you click the numeric control, including the increment or decrement arrows, and displays a dialog box. Because the dialog box appears while you still have the mouse button depressed, the dialog box retains focus when you release the mouse button, and the numeric control never receives notification of the change in the state of the mouse button because the dialog box receives the notification instead. After you close the dialog box, the numeric control resumes responding to the previous Mouse Down? event and can continue to increment or decrement the control indefinitely, even though you are no longer pressing the mouse button.

To avoid this problem, National Instruments recommends that you do not use dialog boxes inside event cases that handle the Mouse Down? event. Instead, invoke the dialog box inside the Mouse Up event case or outside the Event structure.