|Download Help (Windows Only)|
Engine.NotifyStartOfModalDialogEx ( sequenceContextParam, shouldAbort)
Returns the modalID to pass to the Engine.NotifyEndOfModalDialog method when the dialog box no longer appears onscreen.
Notifies TestStand that you are about to launch a modal dialog box.
|Note If you call the Engine.NotifyStartOfModalDialogEx method, you must also call the Engine.NotifyEndOfModalDialog method when the dialog box closes or subsequent calls to the Engine.NotifyStartOfModalDialogEx method will block, potentially hanging TestStand.|
This method returns a modalID, which you pass to the Engine.NotifyEndOfModalDialog method when the dialog box is closed. TestStand uses this notification to determine when to disable the main window of the application and to enforce the modality of the dialog box.
LabVIEW modal dialog box
Call Start Modal Dialog.vi and End Modal Dialog.vi in TestStand.llb instead of the Engine.NotifyStartOfModalDialogEx and Engine.NotifyEndOfModalDialog methods.
LabWindows/CVI modal dialog box
Call TS_EndModalDialog or TS_StartModalDialogEx in <TestStand>\API\CVI\tsutil.fp instead of the Engine.NotifyStartOfModalDialogEx and Engine.NotifyEndOfModalDialog methods.
|Note Do not call this method when launching a dialog box that the TestStand API implements.|
|Note This method differs from the Engine.NotifyStartOfModalDialog method in that if multiple threads call into this method at the same time, only the first thread proceeds. The rest block until the first thread calls the Engine.NotifyEndOfModalDialog method, at which point the next thread proceeds. Thus, TestStand launches modal dialog boxes one at a time using this method. To use this method, you must launch the dialog box within the step of an execution and you must pass the sequence context of the step to this method.|
In certain environments, dialog boxes might take a parameter that is a parent window handle. For this situation, call this method before creating the dialog box, treat the return value as a window handle, and pass the return value as the handle for the parent window. For environments such as Microsoft Visual Basic, in which setting the parent window handle of dialog boxes is difficult, use the Engine.RegisterModalWindow method instead.
sequenceContextParam As SequenceContext
[In] Specifies the sequence context of the step launching the modal dialog box. You can also pass a NULL reference but doing so loses the added functionality of this method.
shouldAbort As Boolean
[Out] Returns True when the user terminates or aborts the corresponding execution for the sequence context parameter you passed while you were blocked inside this method call. The step skips launching the dialog box and returns as soon as possible. You can call the Engine.NotifyEndOfModalDialog method in this case, though it is not necessary. If you are using the CVI TS_StartModalDialogEx function, always call the corresponding TS_EndModalDialog function. Similarly, if you are using Start Modal Dialog.vi in LabVIEW, always call End Modal Dialog.vi.