PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • EndService and EndProgram functions
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
Ends the execution of the current program.
WINDEVWindows Mobile All the windows are closed and no code is run.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPadApple WatchUniversal Windows 10 App This function must only be used for debugging because ending applications is not allowed by the license for this type of device.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPadApple WatchUniversal Windows 10 App This function must only be used for debugging because ending applications is not allowed by the license for this type of device.
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPadApple WatchUniversal Windows 10 App This function must only be used for debugging because ending applications is not allowed by the license for this type of device.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget 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
WINDEVReports and QueriesWindows MobileUniversal Windows 10 AppJavaUser code (UMC)
// Check the password
IF Password <> "Rantanplan" THEN
EndProgram("Wrong password")
END
WEBDEV - Server codePHPAjax
// Check the password
IF Password <> "Rantanplan" THEN
PageDisplay(PAGE_End)
EndProgram()
END
Syntax
EndProgram([<Line 1> [... , <Line N> [, <Closing Code>]]])
<Line 1>: Optional character string (with quotes)
Lines of the message to display when the program is ended. This message is displayed in an "Error" dialog box.
<Line N>: Optional character string (with quotes)
Lines of the message to display when the program is ended. This message is displayed in an "Error" dialog box.
<Closing Code>: Optional boolean
  • False (default value) if the end must of project must not be run.
  • True if the closing code of the project is run.
Remarks

EndService and EndProgram functions

In a service:
  • EndService is used to end the execution of the service by performing the following operations:
    • configuring the execution of the ending codes
    • simulating the failure of the service that triggers the failure operations of the OS (automatic restart or restarting the computer for example in Windows).
  • EndProgram can be used with the following specific features:
    • the message is ignored.
    • the ending codes are run (or not) depending on the presence of the boolean in last parameter.
    • the service ends normally and no failure is simulated.
In an application, EndService can be used with the following specific features:
  • no message is displayed when exiting from the application.
  • the ending codes are run (or not) depending on the presence of the ending option.
  • the failure option has no effect.
Related Examples:
WD Magnifier Complete examples (WINDEV): WD Magnifier
[ + ] This example enables you to zoom part of the screen with a magnifier.
The maximum zoom value is set to 8.
Summary of the example supplied with WINDEV:
The WLanguge function named dCopyBlt() and the WLanguage property named ..Opacity allow you to perform a capture of the Windows desktop at the location of a window without this window appearing in the screen shot.
This example uses this tip to zoom the part of the screen found below the magnifier.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment