- Customizing the display of messages
In french: HSurAppelServeur
Available only with this kind of connection
Customizes the management of message display on the client computer and the management of disconnection from a client computer.
// Define the Client messages
// The ClientMessage procedure is called
// whenever HSendMessageToClient is used
// ClientMessage procedure
PROCEDURE ClientMessage(Type, MessageToDisplay, DurationMessageDisplay)
IF Type = hMessage THEN
<Result> = HOnServerCall(<Type of message> [, <WLanguage procedure> [, <Options>]])
- 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
Option for running the procedure:
|hSecondaryThread||The procedure is run in a secondary thread.|
If this option is not specified, the procedure is run in the main thread.
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).
- 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)
- HOnServerCall can be used in a Windows service.
Business / UI classification: Business Logic
This page is also available for…