Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

RegisterModalWindow Method

NI TestStand™ 4.0 Help
April 2007

NI Part Number:
370052F-01

»View NI TestStand Product Info

Syntax

Engine.RegisterModalWindow ( sequenceContextParam, modalHWND, shouldAbort)

Return Value

long

Returns the modalID to pass to UnregisterModalWindow when your dialog box no longer appears on screen.

Purpose

Notifies TestStand that the specified window is a modal dialog box.

Remarks

Call this method after you create a modal dialog box. TestStand disables the main application window and forwards any activation requests to the specified window. Call UnregisterModalWindow when the dialog box closes.

You must call this method after you have created the dialog box window. An alternative to using this method is to call the NotifyStartOfModalDialogEx method, which you must call before creating the dialog box window.

For a Microsoft Visual Basic modal dialog box, if you display your dialog box from multiple threads at the same time, you must use an executable ActiveX server project and set the project settings to Thread Per Object.

Parameters

sequenceContextParam As SequenceContext

[In] If you display your dialog box from the step of an execution, pass the step's sequence context; otherwise, pass a NULL reference. If you pass a sequence context, this method serializes calls from multiple threads the same way the NotifyStartOfModalDialogEx method serializes calls.

modalHWND As long

[In] Specifies the window handle (HWND) of the modal dialog box.

shouldAbort As Boolean

[Out] If this parameter returns True, the corresponding execution for the sequence context parameter you passed has been terminated or aborted by the user while you were blocked inside this method call. Your step should skip displaying its dialog box and return as soon as possible. You may call UnregisterModalWindow in this case, though it is not necessary.


See Also

NotifyEndOfModalDialog

NotifyStartOfModalDialogEx

UnregisterModalWindow


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit