以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 这个代码是什么回事?(已解决,是我的问题) (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=54042) |
-- 作者:blackzhu -- 发布时间:2014/7/21 7:51:00 -- 这个代码是什么回事?(已解决,是我的问题) 奇了怪了 这个代码用了N多次了 怎么会出现错误? Syscmd.Project.OpenUserMenu() For Each rb As RibbonMenu.Tab In RibbonTabs rb.Visible = False Next Dim dt As DataTable = DataTables("功能导航") Dim Arys As List(Of String()) Arys = dt.GetValues("功能组","","序号") With ConfigBar .Items.Clear For Each Ary As String() In Arys Dim m As New RibbonMenu.MenuButton(Ary(0)) msgbox(2) m.Text = Ary(0) \' m.SmallImage = GetImage(Ary(1)) m.ArrowVisible = False .Items.Add(m) msgbox(1) Dim drs As List(Of DataRow) drs = dt.Select("[功能组] = \'" & Ary(0) & "\'","序号") If drs.Count > 0 Then For Each dr As DataRow In drs Select Case dr("菜单控件类型") Case "按钮" Dim b As New RibbonMenu.Button(dr("模块名称")) b.Text = dr("模块名称") \' b.SmallImage= GetImage(dr("模块图标")) m.Items.Add(b) End Select Next End If Next End With 我用其他的项目测试可以成功呀! [此贴子已经被作者于2014-7-21 8:02:16编辑过]
|