以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 新版弹错! (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=96723) |
-- 作者:zhy400137 -- 发布时间:2017/2/27 10:50:00 -- 新版弹错! .NET Framework 版本:2.0.50727.4927 Foxtable 版本:2017.3.1.1 错误所在事件:项目,AfterOpenProject 详细错误信息: 无法加载一个或多个请求的类型。有关更多信息,请检索 LoaderExceptions 属性。 旧版下没有问题的项目,装上新版后,打开弹错!请教原因,谢谢~!
|
-- 作者:zhy400137 -- 发布时间:2017/2/27 10:52:00 -- Dim cmd As New SQLCommand cmd.ConnectionName = DataSource cmd.CommandText = "S ELECT * Fro m {用户管理} Where [_Identify] Is Null" _UserTable = cmd.ExecuteReader(True) Forms("登录窗口").Open() If _UserName = "" Then Syscmd.Project.Exit() Return \'这个要加上,因为既然要退出,就不应该再执行后面的初始化代码了,否则会出错 End If \'开启表关闭按钮 ShowCloseButton = True \'设置字体 Dim f As new Font("微软雅黑",9) For Each tb As Table In Tables Tables(tb.Name).Font = f Next basemainform.Controls("MainPages").Font = new Font("微软雅黑",9) \'设置顶端标题 BaseMainform.Text = "权限框架" \'加载菜单 Dim dr As DataRow dr=DataTables("用户管理").SqlFind("用户名称=\'" & _UserName & "\'") If dr IsNot Nothing If dr("功能组菜单")=True Then Syscmd.Project.OpenUserMenu() Functions.Execute("生成功能菜单") Forms("首页").open For Each c As Winform.Control In Forms("首页").Controls c.Visible=False Next End If If dr("导航栏菜单")=True Then Forms("Log").open Forms("导航目录树").OpenTo("首页") Forms("首页").open \'关闭系统的菜单条 For Each r As Object In RibbonTabs r.visible = True Next For Each c As Winform.Control In Forms("首页").Controls c.Visible=False Next End If If dr("ListView菜单")=True Then Forms("Log").open Forms("首页").open \'关闭系统的菜单条 For Each r As Object In RibbonTabs r.visible = True Next End If End If \'保证首页一直在第一位 Dim t As C1Command.C1DockingTab = BaseMainForm.Controls("MainPages") Dim pg As C1Command.C1DockingTabPage = t.TabPages("首页") If pg IsNot Nothing Then t.TabPages.Insert(0,pg) End If
|
-- 作者:zhy400137 -- 发布时间:2017/2/27 10:52:00 -- AfterOpenProject中的代码,如上! |
-- 作者:狐狸爸爸 -- 发布时间:2017/2/27 10:58:00 -- Foxtable 2017这方面没有变化,你先分析一下,看看是哪一行代码出错: http://www.foxtable.com/webhelp/scr/1485.htm |
-- 作者:有点色 -- 发布时间:2017/2/27 11:02:00 -- 以下是引用zhy400137在2017/2/27 10:52:00的发言:
AfterOpenProject中的代码,如上!
1、你foxtable设置成管理员权限打开了吗?
2、加入msgbox看看哪句代码有问题。 |
-- 作者:zhy400137 -- 发布时间:2017/2/27 11:11:00 -- Dim dr As DataRow dr=DataTables("用户管理").SqlFind("用户名称=\'" & _UserName & "\'") If dr IsNot Nothing If dr("功能组菜单")=True Then Syscmd.Project.OpenUserMenu() Functions.Execute("生成功能菜单") Forms("首页").open For Each c As Winform.Control In Forms("首页").Controls c.Visible=False Next End If If dr("导航栏菜单")=True Then Forms("Log").open Forms("导航目录树").OpenTo("首页") Forms("首页").open \'关闭系统的菜单条 For Each r As Object In RibbonTabs r.visible = True Next For Each c As Winform.Control In Forms("首页").Controls c.Visible=False Next End If If dr("ListView菜单")=True Then Forms("Log").open Forms("首页").open \'关闭系统的菜单条 For Each r As Object In RibbonTabs r.visible = True Next End If End If
|
-- 作者:zhy400137 -- 发布时间:2017/2/27 11:11:00 -- 错误在这段里面! |
-- 作者:狐狸爸爸 -- 发布时间:2017/2/27 11:14:00 -- 继续调试,精确到是哪一行出错 |
-- 作者:zhy400137 -- 发布时间:2017/2/27 11:22:00 -- 貌似发现问题了,要先以管理员身份运行2017,再打开项目,不能双击直接打开项目,这貌似有点麻烦~! 我在项目文件上右键,貌似没有以管理员权限运行的按钮!谢谢!
|
-- 作者:zhy400137 -- 发布时间:2017/2/27 11:27:00 -- 自己百度设置了,谢谢! |