AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones de actualización de aplicaciones
  • Overview
  • Programming
  • Custom procedure
  • Initializing the custom procedure
  • Application shutdown
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Overview
To customize the remote control performed on a multi-user WINDEV application, you can trigger the execution of a procedure found in the application.
This procedure will be used instead of the standard message window. This procedure allows you to entire customize the remote administration of application stop.
This procedure can be used for example:
  • to check the name of the logged-in user (in the case of groupware): a message will be displayed only if the user corresponds to an administrator.
  • for the applications without interface, run in background task.
  • to open a specific window.
Programming

Custom procedure

The custom procedure must be a global procedure of the project. In this procedure, you have the ability to retrieve and process the different information regarding the current mode.
The procedure declaration must be such as:
PROCEDURE <Procedure name> ([<Mode>[, <Message>[ <Display duration>]]])

where the parameters are as follows:
<Mode>Constant defining the current remote control mode:
  • acInterdict: forbidden access to the application
  • acWarning: warning of an imminent stop
  • acStop: application stop
<Message>Message corresponding to the current mode (this message must be displayed in the window).
<Display duration>Maximum window display time (in seconds)
// -- Procedure ProcessMessage
PROCÉDURE ProcessMessage(AccessMode, MessageToDisplay, DispDuration)
SWITCH AccessMode
CASE acForbidden
IF UserName  "ADMIN" THEN Open(WIN_UnableToConnect)
CASE acWarning
IF UserName <>  "ADMIN" THEN Info(MessageToDisplay)
CASE acStop
IF UserName <> "ADMIN" THEN EndProgram()
END

Initializing the custom procedure

To use the custom procedure to automatically check your application, AppControl must be called in the initialization code of your project:
AppControl("U:\MyApp\WDUPDATE.NET", WIN_ProcessMessage)
where WIN_ProcessMsg is the name of the custom window,
and "WDUPDATE.NET" is the application control file.
Tip The call to function AppControl must be the first instruction in the project initialization code.

Application shutdown

When using a custom procedure, the stop mode defined for the application (acStop constant) does not automatically stop the application. The call to EndProgram must be included in your application.
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local