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


Web Studio Help eactivity viewerpostmessage.xml d168294e115 ViewerPostMessage
The name of the screen to which the message will be posted.
The number of the Windows System Message to be posted.
Additional, message-specific information that is passed to wParam of the Windows System Message.
Additional, message-specific information that is passed to lParam of the Windows System Message.
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.


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

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.


Send message 16 to the screen named “main” with ID 10: