📄 主菜单1.mpr
字号:
* *********************************************************
* *
* * 2007/09/16 主菜单1.MPR 17:24:41
* *
* *********************************************************
* *
* * 作者名称
* *
* * 版权所有 (C) 2007 公司名称
* * 地址
* * 城市, 邮编
* * 国家
* *
* * 说明:
* * 此程序由 GENMENU 自动生成。
* *
* *********************************************************
* To attach this menu to your Top-Level form,
* call it from the Init event of the form:
* Syntax: DO <mprname> WITH <oFormRef> [,<cMenuname>|<lRename>][<lUniquePopups>]
* oFormRef - form object reference (THIS)
* cMenuname - name for menu (this is required for Append menus - see below)
* lRename - renames Name property of your form
* lUniquePopups - determines whether to generate unique ids for popup names
* example:
* PROCEDURE Init
* DO mymenu.mpr WITH THIS,.T.
* ENDPROC
* Use the optional 2nd parameter if you plan on running multiple instances
* of your Top-Level form. The preferred method is to create an empty string
* variable and pass it by reference so you can receive the form name after
* the MPR file is run. You can later use this reference to destroy the menu.
* PROCEDURE Init
* LOCAL cGetMenuName
* cGetMenuName = ""
* DO mymenu.mpr WITH THIS, m.cGetMenuName
* ENDPROC
* The logical lRename parameter will change the name property of your
* form to the same name given the menu and may cause conflicts in your
* code if you directly reference the form by name.
* You will also need to remove the menu when the form is destroyed so that it does
* not remain in memory unless you wish to reactivate it later in a new form.
* If you passed the optional lRename parameter as .T. as in the above example,
* you can easily remove the menu in the form's Destroy event as shown below.
* This strategy is ideal when using multiple instances of Top-Level forms.
* example:
* PROCEDURE Destroy
* RELEASE MENU (THIS.Name) EXTENDED
* ENDPROC
* Using Append/Before/After location options:
* You might want to append a menu to an existing Top-Level form by setting
* the Location option in the General Options dialog. In order to do this, you
* must pass the name of the menu in which to attach the new one. The second
* parameter is required here. If you originally created the menu with the lRename
* parameter = .T., then you can update the menu with code similar to the following:
* example:
* DO mymenu2.mpr WITH THISFORM,THISFORM.name
*
* Using lUniquePopups:
* If you are running this menu multiple times in your application, such as in multiple
* instances of the same top-level form, you should pass .T. to the lUniquePopups
* parameter so that unique popup names are generated to avoid possible conflicts.
* example:
* PROCEDURE Init
* DO mymenu.mpr WITH THIS,.T.,.T.
* ENDPROC
*
* Note: Parm4-Parm9 are not reserved and freely available for use with your menu code.
*
LPARAMETERS oFormRef, getMenuName, lUniquePopups, parm4, parm5, parm6, parm7, parm8, parm9
LOCAL cMenuName, nTotPops, a_menupops, cTypeParm2, cSaveFormName
IF TYPE("m.oFormRef") # "O" OR ;
LOWER(m.oFormRef.BaseClass) # 'form' OR ;
m.oFormRef.ShowWindow # 2
MESSAGEBOX([只能从顶层表单调用该菜单。请确认您表单的 ShowWindow 属性已设为 2。阅读此菜单 MPR 文件的头部分,可以获得详细信息。])
RETURN
ENDIF
m.cTypeParm2 = TYPE("m.getMenuName")
m.cMenuName = SYS(2015)
m.cSaveFormName = m.oFormRef.Name
IF m.cTypeParm2 = "C" OR (m.cTypeParm2 = "L" AND m.getMenuName)
m.oFormRef.Name = m.cMenuName
ENDIF
IF m.cTypeParm2 = "C" AND !EMPTY(m.getMenuName)
m.cMenuName = m.getMenuName
ENDIF
DIMENSION a_menupops[8]
IF TYPE("m.lUniquePopups")="L" AND m.lUniquePopups
FOR nTotPops = 1 TO ALEN(a_menupops)
a_menupops[m.nTotPops]= SYS(2015)
ENDFOR
ELSE
a_menupops[1]="_mfile"
a_menupops[2]="_mwindow"
a_menupops[3]="_msystem"
a_menupops[4]="_webmenu"
a_menupops[5]="浏览"
a_menupops[6]="库存信息管"
a_menupops[7]="进货管理"
a_menupops[8]="输出报表"
ENDIF
* *********************************************************
* *
* * 菜单定义
* *
* *********************************************************
*
DEFINE MENU (m.cMenuName) IN (m.oFormRef.Name) BAR
DEFINE PAD _msm_file OF (m.cMenuName) PROMPT "文件(\<F)" COLOR SCHEME 3 ;
NEGOTIATE LEFT, NONE ;
KEY ALT+F, "" ;
MESSAGE "创建、打开、保存、打印文件或退出 Visual FoxPro"
DEFINE PAD _msm_windo OF (m.cMenuName) PROMPT "窗口(\<W)" COLOR SCHEME 3 ;
NEGOTIATE RIGHT, LEFT ;
KEY ALT+W, "" ;
MESSAGE "操作窗口,显示命令窗口和数据工作期窗口"
DEFINE PAD _msm_systm OF (m.cMenuName) PROMPT "帮助(\<H)" COLOR SCHEME 3 ;
NEGOTIATE NONE, RIGHT ;
KEY ALT+H, "" ;
MESSAGE "显示 Visual FoxPro 的帮助信息"
DEFINE PAD _26k11bhjb OF (m.cMenuName) PROMPT "浏览" COLOR SCHEME 3
DEFINE PAD _26k11bhjc OF (m.cMenuName) PROMPT "商品信息维护" COLOR SCHEME 3
DEFINE PAD _26k11bhjd OF (m.cMenuName) PROMPT "库存信息管理" COLOR SCHEME 3
DEFINE PAD _26k11bhje OF (m.cMenuName) PROMPT "进货管理" COLOR SCHEME 3
DEFINE PAD _26k11bhjf OF (m.cMenuName) PROMPT "输出报表" COLOR SCHEME 3
DEFINE PAD _26k11bhjg OF (m.cMenuName) PROMPT "退出" COLOR SCHEME 3
ON PAD _msm_file OF (m.cMenuName) ACTIVATE POPUP (a_menupops[1])
ON PAD _msm_windo OF (m.cMenuName) ACTIVATE POPUP (a_menupops[2])
ON PAD _msm_systm OF (m.cMenuName) ACTIVATE POPUP (a_menupops[3])
ON PAD _26k11bhjb OF (m.cMenuName) ACTIVATE POPUP (a_menupops[5])
ON SELECTION PAD _26k11bhjc OF (m.cMenuName) do form 12
ON PAD _26k11bhjd OF (m.cMenuName) ACTIVATE POPUP (a_menupops[6])
ON PAD _26k11bhje OF (m.cMenuName) ACTIVATE POPUP (a_menupops[7])
ON PAD _26k11bhjf OF (m.cMenuName) ACTIVATE POPUP (a_menupops[8])
ON SELECTION PAD _26k11bhjg OF (m.cMenuName) ;
DO _26k11bhjh ;
IN LOCFILE("家电超市库存管理信息系统\主菜单1" ,"MPX;MPR|FXP;PRG" ,"WHERE is 主菜单1?")
DEFINE POPUP (a_menupops[1]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR _mfi_new OF (a_menupops[1]) PROMPT "新建(\<N)..." ;
KEY CTRL+N, "Ctrl+N" ;
MESSAGE "创建新文件"
DEFINE BAR _mfi_open OF (a_menupops[1]) PROMPT "打开(\<O)..." ;
KEY CTRL+O, "Ctrl+O" ;
MESSAGE "打开已有文件"
DEFINE BAR _mfi_close OF (a_menupops[1]) PROMPT "关闭(\<C)" ;
MESSAGE "关闭当前文件"
DEFINE BAR _mfi_clall OF (a_menupops[1]) PROMPT "全部关闭" ;
MESSAGE "全部关闭窗口"
DEFINE BAR _mfi_sp100 OF (a_menupops[1]) PROMPT "\-"
DEFINE BAR _mfi_save OF (a_menupops[1]) PROMPT "保存(\<S)" ;
KEY CTRL+S, "Ctrl+S" ;
MESSAGE "保存当前改动了的文件"
DEFINE BAR _mfi_savas OF (a_menupops[1]) PROMPT "另存为(\<A)..." ;
MESSAGE "用新文件名保存当前改动了的文件"
DEFINE BAR _mfi_saveashtml OF (a_menupops[1]) PROMPT "另存为 HTML(\<H)..." ;
MESSAGE "将当前文件另存为 HTML"
DEFINE BAR _mfi_revrt OF (a_menupops[1]) PROMPT "还原(\<R)" ;
MESSAGE "将当前文件还原成最后保存的版本"
DEFINE BAR _mfi_sp200 OF (a_menupops[1]) PROMPT "\-"
DEFINE BAR _mfi_import OF (a_menupops[1]) PROMPT "导入(\<I)..." ;
MESSAGE "导入 Visual FoxPro 文件或其他应用程序的文件"
DEFINE BAR _mfi_export OF (a_menupops[1]) PROMPT "导出(\<E)..." ;
MESSAGE "将 Visual FoxPro 文件导出到其他应用程序的文件中"
DEFINE BAR _mfi_sp300 OF (a_menupops[1]) PROMPT "\-"
DEFINE BAR _mfi_pgset OF (a_menupops[1]) PROMPT "页面设置(\<U)..." ;
MESSAGE "修改页面布局和打印机设置"
DEFINE BAR _mfi_prevu OF (a_menupops[1]) PROMPT "打印预览(\<V)" ;
MESSAGE "在打印前显示整个页面"
DEFINE BAR _mfi_sysprint OF (a_menupops[1]) PROMPT "打印(\<P)..." ;
KEY CTRL+P, "Ctrl+P" ;
MESSAGE "打印一个文本文件,报表,标签、命令窗口的内容或剪贴板上的内容"
DEFINE BAR _mfi_send OF (a_menupops[1]) PROMPT "发送(\<D)..." ;
MESSAGE "显示“邮件”窗口以发送电子邮件"
DEFINE BAR _mfi_sp400 OF (a_menupops[1]) PROMPT "\-"
DEFINE BAR _mfi_quit OF (a_menupops[1]) PROMPT "退出(\<X)" ;
MESSAGE "退出 Visual FoxPro"
DEFINE POPUP (a_menupops[2]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR _mwi_arran OF (a_menupops[2]) PROMPT "全部重排(\<A)" ;
MESSAGE "用非重叠方式重排窗口"
DEFINE BAR _mwi_sp100 OF (a_menupops[2]) PROMPT "\-"
DEFINE BAR _mwi_hide OF (a_menupops[2]) PROMPT "隐藏(\<H)" ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -