ViewerPostMessage

The function ViewerPostMessage posts a Windows System Message to the specified project screen.

Function Group Execution Windows Embedded Thin Client Mobile Access
ViewerPostMessage Module Activity Asynchronous Supported Supported Supported Not supported

Syntax

  ViewerPostMessage(strScrTitle,numMessage,numwParam,numlParam,optNumID)  
Web Studio Help eactivity viewerpostmessage.xml d168294e115 ViewerPostMessage

strScrTitle
The name of the screen to which the message will be posted.
numMessage
The number of the Windows System Message to be posted.
numwParam
Additional, message-specific information that is passed to wParam of the Windows System Message.
numlParam
Additional, message-specific information that is passed to lParam of the Windows System Message.
optNumID
The specific ID number of the screen. (This number is assigned when the screen is opened using the function Open.)

This parameter is optional; if no value is specified, the default value is 0.

Returned value

This function does not return any value.

Notes

This function emulates the PostMessage function in Microsoft Windows. For more information, including a complete list of available Windows System Messages, go to: msdn.microsoft.com/library/ms644944

If the option Enforce Web functionality equivalence is selected in the project settings, this function cannot be called from Global Procedures or Script worksheets. This is because the function is meaningful only when it is executed on stations that display project screens; it might cause unexpected behavior if it is called from background tasks that are executed on the project runtime server. For more information, see Preferences tab.

Examples

Send message 16 to the screen named “main” with ID 10:
  ViewerPostMessage("main",16,3,1,10)  

ViewerPostMessage