Engine.RegisterUIMessage
- Updated2025-07-21
- 1 minute(s) read
Engine.RegisterUIMessage
Syntax
Engine.RegisterUIMessage( messageName)
Return Value
Returns the event code for the message. Use this value as the eventCode parameter of the Thread.PostUIMessageEx method.
Returns -1 if there are no more message codes available for registration.
Purpose
Defines a new UIMessage that is guaranteed to be unique for the lifetime of the engine.
Remarks
Use this method to define new messages for step types or user interfaces to ensure that they do not conflict with messages defined by other custom TestStand components, such as add-on products. This method returns the previously assigned message code if the message is already assigned.
Messages the Engine.RegisterUIMessages method defines do not generate an ApplicationMgr.UserMessage event, but TestStand does send the message to ApplicationMgr.UIMessageEvent .
Parameters
messageName As String
[In] Specifies the name of the message to register.