这样动态定义菜单?合理不?
* ********************************************************** * 菜单定义
* *********************************************************
SET SYSMENU TO
SET SYSMENU AUTOMATIC
DEFINE PAD _4ey0y6uhw OF _MSYSMENU PROMPT "系统(\<S)" COLOR SCHEME 3 ;
KEY ALT+S, "ALT+S"
*...
ON PAD _4ey0y6uhw OF _MSYSMENU ACTIVATE POPUP 系统s
*...
DEFINE POPUP 系统s MARGIN RELATIVE SHADOW COLOR SCHEME 4
IF P11=.T.
DEFINE BAR 1 OF 系统s PROMPT "1.1—用户登录"
ON SELECTION BAR 1 OF 系统s DO FORM form\Login.scx
ENDIF
IF P12=.T.
DEFINE BAR 2 OF 系统s PROMPT "1.2—用户设置"
ON SELECTION BAR 2 OF 系统s DO FORM form\User.scx
ENDIF
IF P13=.T. OR P14=.T.
DEFINE BAR 3 OF 系统s PROMPT "\-"
ENDIF
IF P13=.T.
DEFINE BAR 4 OF 系统s PROMPT "1.3—界面设置"
ON SELECTION BAR 4 OF 系统s DO FORM form\Ui_set.scx
ENDIF
IF P14=.T.
DEFIN BAR 5 OF 系统s PROMPT "1.4—参数设置"
ON SELECTION BAR 5 OF 系统s DO FORM form\Sys_set.scx
ENDIF
DEFINE BAR 6 OF 系统s PROMPT "\-"
DEFINE BAR 7 OF 系统s PROMPT "1.5—退出系统" ;
KEY ALT+X, "ALT+X"
ON SELECTION BAR 7 OF 系统s DO ExitSys
* Called By: ON SELECTION BAR 7 OF POPUP 系统s
* Prompt: 退出系统
PROCEDURE ExitSys
ASN=MESSAGEBOX("确定要退出本系统吗? ",32+4,"确认提示")
IF ASN=6
SET SYSMENU TO DEFAULT
ENDIF
[ 本帖最后由 mywisdom88 于 2015-8-6 16:48 编辑 ]