PC SOFT

WINDEV的在线文档

  • 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
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

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.

19版本和更高版本
The CustomMenu is also available from the Project dashboard, via the "CustomMenu" Widget.
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 must be added to your command line. For example, "Name of Current Project" {$ProjectName} will be replaced by the name of your project currently edited.
  6. Select the runtime options of the 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. Enter the "Calculator" caption.
  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. Enter the "Project information" caption.
  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.