mark 预览按钮
全局代码
Public Sub yl_CommandClick(sender As object, e As C1.Win.C1Command.ClickEventArgs)
vars("保存").performclick
vars("预览").performclick
End Sub
计划管理
Dim frm = windows.forms.form.activeform
If frm IsNot Nothing Then
If frm.name = "frmMdi" Then
Dim menu = frm.controls("C1MainMenu1")
Dim hs As Boolean = False
For Each cm As object In menu.CommandLinks
If cm.text.contains("文件") Then
For Each ccm As object In cm.Command.CommandLinks
If ccm.text = "保存" Then
vars("保存") = ccm.command
End If
If ccm.text.contains("预览") Then
vars("预览") = ccm.command
End If
Next
End If
If cm.text = "预览" Then
hs = True
End If
Next
if hs = false then
Dim yl As new C1.Win.C1Command.C1CommandMenu
yl.text = "预览"
addhandler yl.click, addressof yl_commandclick
menu.CommandLinks.add(new C1.Win.C1Command.C1CommandLink(yl))
end if
End If
End If