// Define the Client messages
// The ClientMessage procedure is called
// whenever HSendMessageToClient is used
HOnServerCall(hMessage, "ClientMessage")
// ClientMessage procedure
PROCEDURE ClientMessage(Type, MessageToDisplay, DurationMessageDisplay)
IF Type = hMessage THEN
Open(WIN_MyWin, MessageToDisplay)
END
Syntax
<Result> = HOnServerCall(<Type of message> [, <WLanguage procedure> [, <Options>]])
<Result>: Boolean
- True if the operation was successfully performed,
- False otherwise. HError returns more details about the problem.
<Type of message>: Integer constant
Type of message to configure. | |
hDisconnection | Configure the disconnection message. |
hMessage | Configure the information message |
<WLanguage procedure>: Procedure name
Procedure that must be called when a <Type of message> message is displayed.This procedure has the following format:
PROCEDURE <Procedure name>(<Message type>, <Message>, <Display duration>)
If this parameter is not specified, the message will be displayed in the default window.
If this parameter is equal to an empty string (""), the automatic management will be disabled. In case of a disconnection, the connection will be closed by the server. An error will be displayed during the next access to a data file.
<Options>: Integer constant
Versions 19 and laterOption for running the procedure:
| |
Versions 19 and laterhSecondaryThread New in version 19hSecondaryThread hSecondaryThread | The procedure is run in a secondary thread. |
If this option is not specified, the procedure is run in the main thread.
New in version 19Option for running the procedure:
| |
Versions 19 and laterhSecondaryThread New in version 19hSecondaryThread hSecondaryThread | The procedure is run in a secondary thread. |
If this option is not specified, the procedure is run in the main thread.
Option for running the procedure: | |
Versions 19 and laterhSecondaryThread New in version 19hSecondaryThread hSecondaryThread | The procedure is run in a secondary thread. |
If this option is not specified, the procedure is run in the main thread.
Remarks
Customizing the display of messages
All the actions are allowed in the WLanguage procedure.
In case of a disconnection message, the disconnection will be performed after the duration specified in
HDisconnectClient (regardless of the actions performed in the procedure).
Miscellaneous
- HOnServerCall must be used in the main thread.
- HOnServerCall is global to the entire application, including the components run. If HOnServerCall is used in a component, it will be enabled for the host application (the last call to HOnServerCall is taken into account)
Versions 24 and laterHOnServerCall can be used in a Windows service.
New in version 24HOnServerCall can be used in a Windows service.
HOnServerCall can be used in a Windows service.
Business / UI classification: Business Logic