| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1337 人关注过本帖
标题:如何解决菜单运行错误的问题
取消只看楼主 加入收藏
wszbd
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-12-18
收藏
 问题点数:0 回复次数:4 
如何解决菜单运行错误的问题
大家好:
小弟我刚学VF编程,遇到个问题,请教高手解决,我用应用程序向导生成一个项目,他自带两个菜单文件,tzgl_go和tzgl_main,(tzgl 使我取的程序名字),试运行了一下, 提示说“找不到别名APP—GLOBAL”,请问各位高收手,我怎样才能解决问题?谢谢大家了!!!


搜索更多相关主题的帖子: 菜单 tzgl 运行 main 
2006-12-29 22:37
wszbd
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-12-18
收藏
得分:0 
没有啊?我的这个菜单使用向导生成的,我把其中一个菜单设为启动文件了,别名app-global指的是我取的文件名吗?初学真弄不懂,按照书上的步骤,可一出错就蒙了谢谢了!
2006-12-29 23:08
wszbd
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-12-18
收藏
得分:0 

大哥,我不懂,你看是这些东西吗?
* *********************************************************
* *
* * 12/22/06 TZGL_MAIN.MPR 22:02:34
* *
* *********************************************************
* *
* * 作者名称
* *
* * 版权所有 (C) 2006 公司名称
* * 地址
* * 城市, 邮编
* * 国家
* *
* * 说明:
* * 此程序由 GENMENU 自动生成。
* *
* *********************************************************


* *********************************************************
* *
* * 设置代码
* *
* *********************************************************
*

* This file is a generated, framework-enabling component
* created by APPBUILDER
* (c) Microsoft Corporation


#INCLUDE [..\TZGL_APP.H]

* *********************************************************
* *
* * 菜单定义
* *
* *********************************************************
*

SET SYSMENU TO
SET SYSMENU AUTOMATIC

DEFINE PAD _msm_file OF _MSYSMENU PROMPT "文件(\<F)" COLOR SCHEME 3 ;
NEGOTIATE LEFT, NONE ;
KEY ALT+F, "" ;
MESSAGE "创建、打开、保存、打印文件或退出 "+APP_GLOBAL.cCaption
DEFINE PAD _msm_edit OF _MSYSMENU PROMPT "编辑(\<E)" COLOR SCHEME 3 ;
KEY ALT+E, "" ;
MESSAGE "编辑文本或当前所选部分"
DEFINE PAD _msm_tools OF _MSYSMENU PROMPT "工具(\<T)" COLOR SCHEME 3 ;
KEY ALT+T, ""
DEFINE PAD _msm_prog OF _MSYSMENU PROMPT "程序(\<P)" COLOR SCHEME 3 ;
NEGOTIATE MIDDLE, NONE ;
KEY ALT+P, "" ;
MESSAGE "运行、调试、编译和挂起程序"
DEFINE PAD _msm_fave OF _MSYSMENU PROMPT "收藏夹(\<A)" COLOR SCHEME 3 ;
KEY ALT+A, "ALT+A" ;
MESSAGE "便捷访问“收藏夹”文档"
DEFINE PAD _msm_windo OF _MSYSMENU PROMPT "窗口(\<W)" COLOR SCHEME 3 ;
NEGOTIATE RIGHT, NONE ;
KEY ALT+W, ""
DEFINE PAD _msm_systm OF _MSYSMENU PROMPT "帮助(\<H)" COLOR SCHEME 3 ;
KEY ALT+H, ""
ON PAD _msm_file OF _MSYSMENU ACTIVATE POPUP _mfile
ON PAD _msm_edit OF _MSYSMENU ACTIVATE POPUP _medit
ON PAD _msm_tools OF _MSYSMENU ACTIVATE POPUP _mtools
ON PAD _msm_prog OF _MSYSMENU ACTIVATE POPUP _mprog
ON PAD _msm_fave OF _MSYSMENU ACTIVATE POPUP _mfave
ON PAD _msm_windo OF _MSYSMENU ACTIVATE POPUP _mwindow
ON PAD _msm_systm OF _MSYSMENU ACTIVATE POPUP _msystem

DEFINE POPUP _mfile MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF _mfile PROMPT "新建(\<N)..." ;
MESSAGE "创建文档"
DEFINE BAR 2 OF _mfile PROMPT "打开(\<O)..." ;
MESSAGE "打开文档"
DEFINE BAR 3 OF _mfile PROMPT "关闭(\<C)" ;
SKIP FOR TYPE("_SCREEN.Activeform") # "O" OR _SCREEN.ActiveForm.ShowWindow = 2 ;
MESSAGE "关闭活动表单"
DEFINE BAR 4 OF _mfile PROMPT "\-"
DEFINE BAR 5 OF _mfile PROMPT "保存(\<S)" ;
SKIP FOR EMPTY(AUSED(latemp)) ;
MESSAGE "保存当前表单或表单集上的编辑结果"
DEFINE BAR 6 OF _mfile PROMPT "恢复(\<R)" ;
SKIP FOR EMPTY(AUSED(latemp)) ;
MESSAGE "恢复当前表单或表单集上的编辑结果"
DEFINE BAR 7 OF _mfile PROMPT "\-"
DEFINE BAR 8 OF _mfile PROMPT "打印(\<T)..." ;
SKIP FOR EMPTY(AUSED(latemp)) ;
MESSAGE "打印当前数据"
DEFINE BAR 9 OF _mfile PROMPT "打印报表(\<P)..." ;
MESSAGE "选择报表"
DEFINE BAR 10 OF _mfile PROMPT "打印设置(\<I)...."
DEFINE BAR 11 OF _mfile PROMPT "\-"
DEFINE BAR 12 OF _mfile PROMPT "快速启动(\<Q)..." ;
MESSAGE "选择要运行的表单或报表文档"
DEFINE BAR 13 OF _mfile PROMPT "用户登录(\<U)..." ;
MESSAGE "以其他用户身份登录"
DEFINE BAR 14 OF _mfile PROMPT "\-"
DEFINE BAR 15 OF _mfile PROMPT "退出(\<X)" ;
MESSAGE "退出 "+APP_GLOBAL.cCaption
ON SELECTION BAR 1 OF _mfile APP_GLOBAL.DoNewOpen(.T.)
ON SELECTION BAR 2 OF _mfile APP_GLOBAL.DoNewOpen()
ON SELECTION BAR 3 OF _mfile IIF(APP_GLOBAL.QueryDataSessionUnload(),APP_GLOBAL.ReleaseForm(),.T.)
ON SELECTION BAR 5 OF _mfile APP_GLOBAL.DataUpdate()
ON SELECTION BAR 6 OF _mfile APP_GLOBAL.DataRevert()
ON SELECTION BAR 8 OF _mfile APP_GLOBAL.DoTableOutput()
ON SELECTION BAR 9 OF _mfile APP_GLOBAL.DoReportDialog()
ON SELECTION BAR 10 OF _mfile SET PRINTER TO NAME (SYS(1037))
ON SELECTION BAR 12 OF _mfile APP_GLOBAL.DoStartupForm()
ON SELECTION BAR 13 OF _mfile IIF(APP_GLOBAL.ReleaseForms(),IIF(APP_GLOBAL.SetCurrentUser(.T.),.T., APP_GLOBAL.Release()),.T.)
ON SELECTION BAR 15 OF _mfile APP_GLOBAL.Release()

DEFINE POPUP _medit MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR _med_undo OF _medit PROMPT "撤消(\<U)" ;
KEY CTRL+Z, "Ctrl+Z" ;
MESSAGE "撤消上一个命令或动作"
DEFINE BAR _med_redo OF _medit PROMPT "重做(\<D)" ;
KEY CTRL+R, "Ctrl+R" ;
MESSAGE "重复上一个命令或动作"
DEFINE BAR _med_sp100 OF _medit PROMPT "\-"
DEFINE BAR _med_cut OF _medit PROMPT "剪切(\<U)" ;
KEY CTRL+X, "Ctrl+X" ;
MESSAGE "删除选定部分并将其放到剪贴板上"
DEFINE BAR _med_copy OF _medit PROMPT "复制(\<C)" ;
KEY CTRL+C, "Ctrl+C" ;
MESSAGE "将所选部分复制到剪贴板"
DEFINE BAR _med_paste OF _medit PROMPT "粘贴(\<P)" ;
KEY CTRL+V, "Ctrl+V" ;
MESSAGE "粘贴剪贴板上的内容"
DEFINE BAR _med_clear OF _medit PROMPT "清除(\<A)" ;
MESSAGE "删除选定部分而不将其放到剪贴板上"
DEFINE BAR _med_sp200 OF _medit PROMPT "\-"
DEFINE BAR _med_slcta OF _medit PROMPT "全部选定(\<L)" ;
KEY CTRL+A, "Ctrl+A" ;
MESSAGE "选定所有当前窗口中的文字或数据项"
DEFINE BAR _med_sp300 OF _medit PROMPT "\-"
DEFINE BAR _med_find OF _medit PROMPT "查找(\<F)..." ;
KEY CTRL+F, "Ctrl+F" ;
MESSAGE "查找指定文字"
DEFINE BAR _med_finda OF _medit PROMPT "查找下一个(\<G)" ;
KEY CTRL+G, "Ctrl+G" ;
MESSAGE "重复上一次搜索"
DEFINE BAR _med_repl OF _medit PROMPT "替换(\<E)..." ;
KEY CTRL+L, "Ctrl+L" ;
MESSAGE "替换指定文字"

DEFINE POPUP _mtools MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF _mtools PROMPT "宏(\<A)..." ;
MESSAGE "创建、删除或修正键宏"
DEFINE BAR 2 OF _mtools PROMPT "错误记录(\<E)"
DEFINE BAR 3 OF _mtools PROMPT "\-"
DEFINE BAR 4 OF _mtools PROMPT "选项(\<O)..."
DEFINE BAR 5 OF _mtools PROMPT "更改口令(\<C)..."
ON BAR 1 OF _mtools ACTIVATE POPUP _mmacros
ON BAR 2 OF _mtools ACTIVATE POPUP _merrorlog
ON SELECTION BAR 4 OF _mtools APP_GLOBAL.DoOptionsDialog()
ON SELECTION BAR 5 OF _mtools APP_GLOBAL.DoChangePassword()

DEFINE POPUP _mmacros MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF _mmacros PROMPT "录制宏(\<R)"
DEFINE BAR 2 OF _mmacros PROMPT "清除宏(\<C)"
DEFINE BAR 3 OF _mmacros PROMPT "保存宏为默认值(\<S)"
DEFINE BAR 4 OF _mmacros PROMPT "还原默认宏(\<D)"
ON SELECTION BAR 1 OF _mmacros KEYBOARD ("{"+SET("MACKEY")+"}")
ON SELECTION BAR 2 OF _mmacros CLEAR MACROS
ON SELECTION BAR 3 OF _mmacros APP_GLOBAL.SetMacros(.T.)
ON SELECTION BAR 4 OF _mmacros APP_GLOBAL.SetMacros()

DEFINE POPUP _merrorlog MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF _merrorlog PROMPT "显示错误日志(\<D)"
DEFINE BAR 2 OF _merrorlog PROMPT "导出日志(\<E)"
DEFINE BAR 3 OF _merrorlog PROMPT "清空日志(\<P)"
ON SELECTION BAR 1 OF _merrorlog APP_GLOBAL.DisplayErrorLog()
ON SELECTION BAR 2 OF _merrorlog APP_GLOBAL.ExportErrorLog()
ON SELECTION BAR 3 OF _merrorlog APP_GLOBAL.PurgeErrorLog()

DEFINE POPUP _mprog MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR _mpr_do OF _mprog PROMPT "执行(\<D)..." ;
MESSAGE "运行程序、应用程序、表单、报表、查询或菜单"
DEFINE BAR _mpr_cancl OF _mprog PROMPT "取消(\<C)" ;
MESSAGE "停止运行当前程序"
DEFINE BAR _mpr_resum OF _mprog PROMPT "重新运行(\<R)" ;
MESSAGE "重新运行当前挂起的程序"
DEFINE BAR _mpr_suspend OF _mprog PROMPT "挂起(\<S)" ;
MESSAGE "挂起当前正在运行的程序"
DEFINE BAR _mpr_compl OF _mprog PROMPT "编译(\<O)..." ;
MESSAGE "编译当前的或选定的程序"
DEFINE BAR 6 OF _mprog PROMPT "\-"
DEFINE BAR 7 OF _mprog PROMPT "调试器(\<U)"
DEFINE BAR 8 OF _mprog PROMPT "数据工作期(\<A)"
DEFINE BAR 9 OF _mprog PROMPT "命令窗口(\<M)"
DEFINE BAR 10 OF _mprog PROMPT "\-"
DEFINE BAR _mtl_browser OF _mprog PROMPT "类浏览器(\<B)" ;
MESSAGE "运行类浏览器"
ON SELECTION BAR 7 OF _mprog DEBUG
ON SELECTION BAR 8 OF _mprog APP_GLOBAL.ActivateSystemWindow("View")
ON SELECTION BAR 9 OF _mprog APP_GLOBAL.ActivateSystemWindow("Command")

DEFINE POPUP _mfave MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF _mfave PROMPT "添加至“收藏夹”(\<A)..." ;
MESSAGE "添加至“收藏夹”菜单"
DEFINE BAR 2 OF _mfave PROMPT "清除“收藏夹”(\<C)" ;
MESSAGE "清除“收藏夹”列表"
DEFINE BAR 3 OF _mfave PROMPT "\-"
ON SELECTION BAR 1 OF _mfave APP_GLOBAL.DoStartupForm(.T.)
ON SELECTION BAR 2 OF _mfave APP_GLOBAL.ClearFavorites()

DEFINE POPUP _mwindow MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF _mwindow PROMPT "层叠(\<C)"
DEFINE BAR _mwi_arran OF _mwindow PROMPT "全部重排(\<A)" ;
MESSAGE "重排窗口为标题不重叠"
DEFINE BAR _mwi_rotat OF _mwindow PROMPT "循环(\<Y)" ;
KEY CTRL+F1, "CTRL+F1"
ON SELECTION BAR 1 OF _mwindow APP_GLOBAL.CascadeAll()

DEFINE POPUP _msystem MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR 1 OF _msystem PROMPT "帮助(\<H)" ;
KEY F1, "F1"
DEFINE BAR 2 OF _msystem PROMPT "\-"
DEFINE BAR 3 OF _msystem PROMPT "关于 "+APP_GLOBAL.cCaption+"(\<A)..."
ON SELECTION BAR 1 OF _msystem APP_GLOBAL.DoHelp()
ON SELECTION BAR 3 OF _msystem APP_GLOBAL.DoAboutBox()

ON SELECTION POPUP _mfile MESSAGEBOX(APP_FEATURE_NOT_AVAILABLE_LOC,0,APP_GLOBAL.cCaption)
ON SELECTION POPUP _mtools MESSAGEBOX(APP_FEATURE_NOT_AVAILABLE_LOC,0,APP_GLOBAL.cCaption)
ON SELECTION POPUP _merrorlog MESSAGEBOX(APP_FEATURE_NOT_AVAILABLE_LOC,0,APP_GLOBAL.cCaption)
ON SELECTION POPUP _mprog MESSAGEBOX(APP_FEATURE_NOT_AVAILABLE_LOC,0,APP_GLOBAL.cCaption)
ON SELECTION POPUP _mfave MESSAGEBOX(APP_FEATURE_NOT_AVAILABLE_LOC,0,APP_GLOBAL.cCaption)
ON SELECTION POPUP _mwindow MESSAGEBOX(APP_FEATURE_NOT_AVAILABLE_LOC,0,APP_GLOBAL.cCaption)
ON SELECTION POPUP _msystem MESSAGEBOX(APP_FEATURE_NOT_AVAILABLE_LOC,0,APP_GLOBAL.cCaption)

* *********************************************************
* *
* * 清理代码及过程
* *
* *********************************************************
*

* none of these statements will work
* in exactly this way in a Top menu --
* we'll use the array elements

IF VERSION(2) = 0
RELEASE PAD _msm_prog OF _MSYSMENU
RELEASE POPUP _mprog EXTENDED
ENDIF

* the program pad items, above, always get
* get released in runtime, but some items
* specific to application state may be
* released or disabled as you choose:
IF NOT APP_GLOBAL.lReleaseUnusedMenuItems

IF EMPTY(APP_GLOBAL.cHelpFile)
SET SKIP OF BAR 1 OF _msystem .T.
ENDIF

IF EMPTY(APP_GLOBAL.cOptionsDialogClass)
SET SKIP OF BAR 4 OF _mtools .T.
ENDIF

IF EMPTY(APP_GLOBAL.cAboutBoxClass)
SET SKIP OF BAR 3 OF _msystem .T.
ENDIF

IF EMPTY(APP_GLOBAL.cStartupFormClass)
SET SKIP OF BAR 12 OF _mfile .T.
ENDIF

IF NOT APP_GLOBAL.lUserPreferences
SET SKIP OF BAR 13 OF _mfile .T.
SET SKIP OF BAR 5 OF _mtools .T.
ENDIF


ELSE

* if you prefer

IF EMPTY(APP_GLOBAL.cOptionsDialogClass)
RELEASE BAR 4 OF _mtools
ENDIF

IF EMPTY(APP_GLOBAL.cAboutBoxClass)
RELEASE BAR 3 OF _msystem
ENDIF

IF EMPTY(APP_GLOBAL.cHelpFile)
RELEASE BAR 1 OF _msystem
RELEASE BAR 2 OF _msystem
ENDIF

IF NOT APP_GLOBAL.lUserPreferences
RELEASE BAR 13 OF _mfile
RELEASE BAR 14 OF _mfile
RELEASE BAR 5 OF _mtools
ENDIF

IF EMPTY(APP_GLOBAL.cStartupFormClass)
RELEASE BAR 12 OF _mfile
ENDIF


ENDIF

IF (NOT APP_GLOBAL.lReadEvents)
* unlikely for a Replace-style menu unless
* Top Form, but the following
* isn't safe in a non-ReadEvents environment
RELEASE BAR 1 OF _mTools
RELEASE POPUP _mMacros
ELSE
APP_GLOBAL.cMacroPopupName = "_mMacros"
APP_GLOBAL.SetMacros() && refresh to appropriately disable bar
IF EMPTY(SET("MACKEY"))
RELEASE BAR 1 OF _mMacros
ENDIF
ENDIF


IF (NOT APP_GLOBAL.lFavorites)
RELEASE PAD _msm_Fave OF _MSYSMENU
RELEASE POPUP _mfave EXTENDED
ACTI MENU _MSYSMENU NOWAIT
ELSE
APP_GLOBAL.cFavoritePopupName = "_mFave"
APP_GLOBAL.RefreshFavoritePopup()
ENDIF

2006-12-30 00:01
wszbd
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-12-18
收藏
得分:0 
在哪查找呀?如果在生成一次运行成功的话是不是应该像其它的程序那样有菜单栏呀?是不是我的VF程序有问题呀?我是在网上下载的,谢谢
2006-12-30 00:37
wszbd
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-12-18
收藏
得分:0 
谢谢了朋友,有时间我买张碟重做一下
2006-12-30 00:58
快速回复:如何解决菜单运行错误的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025787 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved