|
|
|
|
|
AppControl (Function) In french: AppliContrôle
Warning
From version 23, AppliControl is kept for backward compatibility. This function has been replaced with AppControl.
This is an advanced function. Remote control of a WINDEV application is automatically implemented when installing an application on a network. This function must only be used to customize remote control management. Enables (or disables) the remote control for the current multi-user WINDEV application. The remote control allows you to "softly" disconnect the users from the WINDEV application in order to update the application (database update for example). The remote control is used to: - prevent from connecting to an application,
- notify the user that the application will be closed for updating,
- disconnect a user in order to update the application.
AppControl("C:\MonAppli\FicStop.Txt", FEN_Control)
AppControl("C:\MonAppli\FicStop.Txt", AppliControle_Callback)
PROCEDURE AppliControle_Callback(ModeAccès, MessageAAfficher, TempsAff)
SWITCH ModeAccès
CASE acForbidden
IF NomUser <> "ADMIN" THEN Open(FEN_ConnexionImpossible)
CASE acWarning
IF NomUser <> "ADMIN" THEN Info(MessageAAfficher)
CASE acStop
IF NomUser <> "ADMIN" THEN EndProgram()
END
Syntax
Enabling or disabling the automatic control Hide the details
AppControl(<Control file> [, <Run project closing code>])
<Control file>: Character string Full path of control file (a UNC path can be used). The control file is a text file, with a defined structure (for more details, see Structure of control file). If this parameter corresponds to an empty string (""), the control is disabled for the current application. WDADMINEXE is used to simplify the creation of the control file. <Run project closing code>: Optional boolean - True to run the "Close" event of the project when exiting the application automatically,
- False (default value), to prevent the execution of the "Close" event of the project.
Automatic control while opening of a custom window Hide the details
AppControl(<Control file> , <Custom window>)
<Control file>: Character string Full path of control file. The control file is a text file, with a defined structure (for more details, see Structure of control file). If this parameter corresponds to an empty string (""), the control is disabled for the current application. WDADMINEXE is used to simplify the creation of the control file. <Custom window>: Window name Name of the application window that will be opened to process the messages sent by the remote control. For more details on how to use a window, see Remote Control: Customizing with your own window.This window must be associated with a procedure of the following type: PROCEDURE <Window name> (<Mode>, <Message>, <Display duration>) | | <Mode> | Retrieves the current mode for remote control:- acInterdict: application access denied.
- acWarning: warning of an imminent stop.
- acStop: application stopped.
| <Message> | Retrieves the message corresponding to the current mode (this message must be displayed in the window). | <Display duration> | Maximum window display time (in seconds). |
Automatic control with custom procedure Hide the details
AppControl(<Control file> , <WLanguage procedure>)
<Control file>: Character string Full path of control file. The control file is a text file, with a defined structure (for more details, see Structure of control file). If this parameter corresponds to an empty string, the check is disabled for the current application. WDADMINEXE is used to simplify the creation of the control file. <WLanguage procedure>: Procedure name Name of the WLanguage procedure called to process the messages sent by the remote control. For more details on how to use a procedure, see Remote Control: Customizing with your own procedure. This procedure must be a global procedure of application. For more details on this procedure, see Parameters of the procedure used by AppControl.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|