相关文章  
  • 重要文件的铠甲:EFS加密
  • Windows2000支持的几种文件系统与比较
  • 你真的了解windows的自启动方式吗?
  • C# 中数组和类型转换的功能实现
  • C#中调用带回调函数和自定义结构体的DLL例程
  • 为 Windows XP Embedded 创建自定义组件
  • 企业用户应当如何利用Windows XP SP2
  • 将现存的信息系统移植到组件化架构
  • 应用程序互操作性:互用性基本原理
  • 动态汉化Windows技术的一些简要分析
  •   推荐  
      科普之友首页   专利     科普      动物      植物        天文   考古   前沿科技
     您现在的位置在:  首页 >>文献 >>培训

    演练:在Excel中建立自定义菜单项3

    >  
      Private MenuBarItem As Office.CommandBarControl
      
      Private WithEvents MenuItem As Office.CommandBarButton // C#
      
      private Office.CommandBar MainMenuBar = null;
      
      private Office.CommandBarControl MenuBarItem = null; private Office.CommandBarButton MenuItem = null;
      
      2.在OfficeCodeBehing类中增加下列程序(通过项目模板建立),这段程序初始化了先前声明的MainMenuBar和MenuItemBar对象。
      
      ' Visual Basic Private
      
      Sub InitMenuBarItems(ByVal Caption As String)
      
      Try MainMenuBar = ThisApplication.CommandBars( _ "Worksheet Menu Bar")
      
      MenuBarItem = MainMenuBar.Controls.Add( _ Office.MsoControlType.msoControlPopup, Temporary:=True) MenuBarItem.Caption = Caption Catch ex As Exception MessageBox.Show(ex.Message, _
      
      ex.Source, MessageBoxButtons.OK, Mess

    页码:[1] [2] [3] [4] [5] [6] [7] [8] [9]3页、共9页

         

          设为首页       |       加入收藏       |       广告服务       |       友情链接       |       版权申明      

    Copyriht 2007 - 2008 ©  科普之友 All right reserved