那位高手帮忙看下,我的菜单生成后为什么运行不了??
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([This menu can only be called from a Top-Level form. Ensure that your form's ShowWindow property is set to 2. Read the header section of the menu's MPR file for more details.])
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[4]
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]="数据处理"
a_menupops[2]="查询功能"
a_menupops[3]="统计功能"
a_menupops[4]="系统管理"
ENDIF
DEFINE MENU (m.cMenuName) IN (m.oFormRef.Name) BAR
DEFINE PAD _2qy10gxju OF (m.cMenuName) PROMPT "处理" COLOR SCHEME 3
DEFINE PAD _2qy10gxjv OF (m.cMenuName) PROMPT "查询功能" COLOR SCHEME 3
DEFINE PAD _2qy10gxjw OF (m.cMenuName) PROMPT "统计功能" COLOR SCHEME 3
DEFINE PAD _2qy10gxjx OF (m.cMenuName) PROMPT "系统管理" COLOR SCHEME 3
DEFINE PAD _2qy10gxjy OF (m.cMenuName) PROMPT "退出系统" COLOR SCHEME 3
ON PAD _2qy10gxju OF (m.cMenuName) ACTIVATE POPUP (a_menupops[1])
ON PAD _2qy10gxjv OF (m.cMenuName) ACTIVATE POPUP (a_menupops[2])
ON PAD _2qy10gxjw OF (m.cMenuName) ACTIVATE POPUP (a_menupops[3])
ON PAD _2qy10gxjx OF (m.cMenuName) ACTIVATE POPUP (a_menupops[4])
ON SELECTION PAD _2qy10gxjy OF (m.cMenuName) set sysmeun to default
DEFINE POPUP (a_menupops[1]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[1]) PROMPT "数据处理"
DEFINE BAR 2 OF (a_menupops[1]) PROMPT "票据处理"
ON SELECTION BAR 1 OF (a_menupops[1]) do form 处理.scx
ON SELECTION BAR 2 OF (a_menupops[1]) do form 票据处理.scx
DEFINE POPUP (a_menupops[2]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[2]) PROMPT "按车辆行驶证号"
DEFINE BAR 2 OF (a_menupops[2]) PROMPT "按车辆类型"
DEFINE BAR 3 OF (a_menupops[2]) PROMPT "按吨位"
ON SELECTION BAR 1 OF (a_menupops[2]) do form 按车辆行驶证号查询
ON SELECTION BAR 2 OF (a_menupops[2]) do form 按车辆类型查询
ON SELECTION BAR 3 OF (a_menupops[2]) do form 按吨位查询
DEFINE POPUP (a_menupops[3]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[3]) PROMPT "按单位统计"
DEFINE BAR 2 OF (a_menupops[3]) PROMPT "按经营范围统计"
DEFINE BAR 3 OF (a_menupops[3]) PROMPT "按吨位统计"
ON SELECTION BAR 1 OF (a_menupops[3]) do form 单位统计
ON SELECTION BAR 2 OF (a_menupops[3]) do form 范围统计
ON SELECTION BAR 3 OF (a_menupops[3]) do form 输入吨位
DEFINE POPUP (a_menupops[4]) MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF (a_menupops[4]) PROMPT "系统维护"
DEFINE BAR 2 OF (a_menupops[4]) PROMPT "修改密码"
ON SELECTION BAR 1 OF (a_menupops[4]) do form 系统维护
ON SELECTION BAR 2 OF (a_menupops[4]) do form 修改密码
ACTIVATE MENU (m.cMenuName) NOWAIT
IF m.cTypeParm2 = "C"
m.getMenuName = m.cMenuName
m.oFormRef.Name = m.cSaveFormName
ENDIF
运行提示this menu can only be called from a TOP-level form,ensure than your form's showwiondow property is set to 2.read the header section of the menu's MPR file for more details.但是我已经把要添加菜单的表单的showwiondow都为2了,而且表单的int都加了do (菜单名).mpr with this ,帮忙小妹噢,论文急着交了……