PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
LoadProcedure (Function)
In French: ChargeProcédure
LoadProcedure is kept for backward compatibility.
In this version, to share procedures among several applications, we advise you to:
  • create a set of procedures
  • create the procedures to share in a set of procedures
  • associate the set of procedures with the different projects that must share these procedures.
The documentation about LoadProcedure is as follows.
 
Purpose
Using the local procedures of a window as procedures global to the project.
Syntax
<Result> = LoadProcedure(<WindowName>, <Message>)
  • <Result> is a boolean indicating whether the procedures have been loaded
  • <WindowName> is a character string containing the name or the alias of the window in which the internal procedures have been described.
  • <Message> is a boolean used to specify whether an error message must be displayed (True by default) or not (False) at run time if procedures are not loaded.
Details
The internal procedures of <WindowName> window become procedures global to the project
<Result> is set to True if the load operation was successfully performed. If <Message>=True, a message signals that the window was not found at run time.
If there is no current project, an error message signals it.
Notes
  • LoadProcedure can be used to load the procedures of 16 windows at the same time.
  • For information: when running a a WLanguage procedure, this one is sought:
    • in the internal procedures of the window,
    • then in the different "modules" loaded,
    • finally in the global procedures.
  • The procedures loaded by LoadProcedure are automatically unloaded when closing the project. They can be unloaded by UnloadProcedure.
  • LoadProcedure does not load:
    • the global variables and the opening code of the window.
    • the code of window controls.
  • The initialization code of the window is not run. Therefore, no global variable can be added when loading the procedure.
  • A window procedure called by LoadProcedure cannot be called by Timer.
  • Caution: if a window procedure called by LoadProcedure is named like an internal procedure of the current window or if it is named like a global procedure, this procedure will not be loaded. We advise you not to load procedures named like procedures that already exist in the window or in the project. The procedure to load can be renamed.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment