PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to proceed?
  • Adding an option to the CustomMenu
  • Deleting an option from the CustomMenu
  • Note
  • Examples
  • Creating an option to run an executable
  • Creating a menu option with macros
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
Overview
The CustomMenu allows you to create a custom menu in the menu bar of WINDEV, WEBDEV and WINDEV Mobile. This feature allows you to add shortcuts to your favorite applications (calculator, ...), to open different files (charter, ...).
Note: To handle the CustomMenu, this feature must be enabled in the editor:
  1. Select "Tools .. Options .. Options of the environment".
  2. In the "Environment" tab, check "CustomMenu".
  3. Validate.
Versions 19 and later
The CustomMenu is also available from the Project dashboard, via the "CustomMenu" Widget.
New in version 19
The CustomMenu is also available from the Project dashboard, via the "CustomMenu" Widget.
The CustomMenu is also available from the Project dashboard, via the "CustomMenu" Widget.
How to proceed?

Adding an option to the CustomMenu

To add an option to the CustomMenu:
  1. Select "CustomMenu .. Customize the <CustomMenu>".Click the logo corresponding to the product version. Select "CustomMenu .. Customize the <CustomMenu>" from the menu that is displayed.
  2. The window for configuring the CustomMenu is displayed.
  3. Click the "Add an option" button.
  4. Enter a menu caption.
  5. Enter the command lines that will be run when this option is selected. You can enter:
    • the path of an executable: enter the path in the control or use the "Browse..." button.
    • macros: click the "Macro" button and double-click the macro that will be added to your command line. For example, "Name of Current Project" {$ProjectName} will be replaced by the name of your project currently edited.
      The main macros are as follows:
      • {$ProjectName}: Name of current project.
      • {$ProjectDir}: Directory of current project.
      • {$FullProjectPath}: Full path of current project.
      • {$ExeName}: Name of executable generated from the current project.
      • {$ConfigName}: Name of current configuration for the current project.
      To find out the entire list of available macros, all you have to do is click the "Macro" button.
  6. Select the runtime options of command line:
    • Display the console: a console (command prompt) will be displayed.
    • Leave the console opened: if a console is displayed, it will remain opened until the end of execution of the program run.
    • Non-locking execution: the execution of the command line will not lock the access to WINDEV, WEBDEV or WINDEV Mobile.
  7. Select the runtime directory of the program.
  8. Enter:
    • the message displayed in the status bar when the option is hovered by the mouse cursor.
    • the icon displayed in front of the option in the CustomMenu.
Note: A folder or a separator can be added to a CustomMenu. A folder is used to create a sub-menu.

Deleting an option from the CustomMenu

To delete an option from the CustomMenu:
  1. Select "CustomMenu .. Customize the <CustomMenu>".Click the logo corresponding to the product version. Select "CustomMenu .. Customize the <CustomMenu>" from the menu that is displayed.
  2. The window for configuring the CustomMenu is displayed.
  3. Select the menu option to delete.
  4. Click the "Delete" button.

Note

An option of a CustomMenu can be run before or after the generation of a project configuration.
Examples

Creating an option to run an executable

This paragraph describes the operations that must be performed to create a menu option used to run an executable (the Windows calculator in this case):
  1. Select "CustomMenu .. Customize the <CustomMenu>".Click the logo corresponding to the product version. Select "CustomMenu .. Customize the <CustomMenu>" from the menu that is displayed.
  2. In the window for configuring the CustomMenu, click the "Add an option" button.
  3. Type the caption: "Calculator".
  4. Click the "Browse..." button and select the "CALC.exe" file (found in the System32 directory of Windows for example).
  5. Type "Start the calculator" in the "Message" control and select the "CALC.exe" file again in the "Icon" control.
  6. Validate.
You now have the ability to open as many calculators as you want from the different editors.

Creating a menu option with macros

This paragraph explains how to create a menu option by using macros. In this example, the macros will be used to open the <ProjectName>.rtf file. This file is automatically created for any new project and it contains general information about the project.
  1. Select "CustomMenu .. Customize the <CustomMenu>".Click the logo corresponding to the product version. Select "CustomMenu .. Customize the <CustomMenu>" from the menu that is displayed.
  2. In the window for configuring the CustomMenu, click the "Add an option" button.
  3. Type the caption: "Project information".
  4. Click the "Macro" button and select the "{$ProjectDir}" macro.
  5. In the command line, type the "\" character after "{$ProjectDir}".
  6. Click the "Macro" button again and select the "{$ProjectDir}" macro.
  7. In the command line, type the ".rtf" characters after "{$ProjectDir}" .
  8. Type "Information about the project" in the "Message" control.
  9. Validate.
You can now open the ".rtf" file specific to each project.
Minimum required version
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment