PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Executing the event of a control or procedure from a window/page other than the current window/page
  • String passed as a parameter to Execute
  • The arrays
  • Opening the window/page
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Starts the execution of a process through programming. This function is mainly used to run procedures.
For backward compatibility, the process run can also be the process of a control, window or page. In these different cases, we recommend that you use ExecuteProcess.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Run a procedure
Execute("Proced1")
// -- Click on BTN_BUTTON1 button
// Run a procedure that returns a result
Info(Execute("Double_Number", 2)) // Displays 4
// Double_Number procedure
PROCEDURE Double_Number(X)
RESULT 2*X
Syntax
Universal Windows 10 AppiPhone/iPadIOS WidgetApple WatchMac Catalyst

Running a procedure that may return a result Hide the details

<Result> = Execute(<WLanguage procedure> [, <Parameter 1> [... [, <Parameter N>]]])
<Result>: Any
Return value of procedure called. This value is identical to the value obtained if the procedure is run directly.
<WLanguage procedure>: Procedure name
Name of WLanguage procedure to run. This procedure returns a result.
<Parameter 1>: Any optional type
First optional parameter that will be passed to the procedure. These parameters are always passed by value.
<Parameter N>: Any optional type
Nth optional parameter that will be passed to the procedure. These parameters are always passed by value.

Running the process of a control (syntax kept for backward compatibility) Hide the details

Execute(<Control name> , <Process>)
<Control name>: Character string
Name of control associated with the process to run.
<Process>: Character string
Process to run:
ClickClick code of control (or menu option)
ExitExit code of control
EntryEntry code of control
InitializationInitialization code of control
PreviousCode used to read the previous record (browsing table in programmed browse only)

NextCode used to read the next record (browsing table in programmed browse only)

DisplayCode used to display a row (table only)
RExitCode used to exit from a table row
REntryCode used to enter in a table row
ENDCode used to read the last record (table only)
ModifyWhenever Modified code of control
DBLCode for double-clicking a treeview element
CLDCode for right-clicking a treeview element
CLIClick (OnClick) (browser code)
WINDEV Mobile This constant is not available.
KDNKey down (OnKeyDown) (browser code)
WINDEV Mobile This constant is not available.
KPRKey pressed and released (OnKeyPressed) (browser code)
WINDEV Mobile This constant is not available.
KUPKey up (OnKeyUp) (browser code)
WINDEV Mobile This constant is not available.
MDNMouse button down (OnMouseDown) (browser code)
WINDEV Mobile This constant is not available.
MMVMouse moves over the control (OnMouseMove) (browser code)
WINDEV Mobile This constant is not available.
MOUMouse exits from the control (OnMouseOut) (browser code)
WINDEV Mobile This constant is not available.
MOVMouse enters in the control (OnMouseOver) (browser code)
WINDEV Mobile This constant is not available.
MUPMouse button up (OnMouseUp) (browser code)
WINDEV Mobile This constant is not available.
BLULoss of focus (OnBlur) (browser code)
WINDEV Mobile This constant is not available.
CHGModification (OnChange) (browser code)
WINDEV Mobile This constant is not available.
FOCGain of focus (OnFocus) (browser code)
WINDEV Mobile This constant is not available.
SELSelected text (OnSelect) (browser code)
WINDEV Mobile This constant is not available.
HLPF1 key (OnHelp) (browser code)
WINDEV Mobile This constant is not available.
Universal Windows 10 AppiPhone/iPadIOS WidgetApple WatchMac Catalyst

Running the process of a window (syntax kept for backward compatibility) Hide the details

Execute([<Window name>, ] <Type of process>)
<Window name>: Optional character string
Name of the window whose process must be run. If this name is not specified, the process of current window is run.
<Type of process>: Character string
Process to run:
INFOpening the window
FEFClosing the window
PRFThe window gains focus
PEFThe window loses focus
MODResizing the window
Remarks
Universal Windows 10 AppiPhone/iPadIOS WidgetApple WatchMac Catalyst

Executing the event of a control or procedure from a window/page other than the current window/page

You can execute the event of a control or procedure from a window/page other than the current window/page. To do so, the control name or the procedure name must be prefixed with the name of the window (or page).
For example:
// Execute the "Click" event of the Validate button in MySibling (open window or page)
Execute("MySibling.Validate..CLI")
 
// Execute the PROC1 procedure of MySibling (open window or page)
Execute("MySibling.PROC1")
Universal Windows 10 AppiPhone/iPadIOS WidgetApple WatchMac Catalyst

String passed as a parameter to Execute

The string passed to Execute as parameter cannot be a built string or a variable. You must use the string that contains the name of the control, window or page as well as the process/event to be executed.
// Correct code
Execute("Edit2..Exit")
 
// Incorrect code
i is int = 5
Execute("Edit" + i + "..Exit")
Universal Windows 10 AppiPhone/iPadIOS WidgetApple WatchMac Catalyst

The arrays

The arrays are not recognized by Execute.
For example:
var_arr is array of 10 strings
// Call the MYPROC procedure with an array passed as parameter
MYPROC(var_arr)
// The following statement triggers an error
Execute("MYPROC..PRO", var_arr)
iPhone/iPadIOS WidgetApple WatchMac Catalyst

Opening the window/page

Execute should not be called to execute the WLanguage event to open a window/page because the global variables may be reset. In this case, use procedures instead.
Component: wd270vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment