设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 2194|回复: 1
打印 上一主题 下一主题

【作业】01课-徐冬

[复制链接]
跳转到指定楼层
1#
发表于 2014-3-8 10:35:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Microsoft.Office.Tools.Ribbon;

  6. namespace WordAddIn1
  7. {
  8.     public partial class Ribbon1
  9.     {
  10.         private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
  11.         {
  12.         }

  13.         private void button1_Click(object sender, RibbonControlEventArgs e)
  14.         {
  15.             System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
  16.             System.Diagnostics.ProcessStartInfo myProStartInfo = new System.Diagnostics.ProcessStartInfo("notepad.exe");
  17.             myProcess.StartInfo = myProStartInfo;
  18.             myProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
  19.             myProcess.Start();
  20.         }

  21.         private void button2_Click(object sender, RibbonControlEventArgs e)
  22.         {
  23.             if (this.checkBox1.Checked)//如果勾选
  24.             {
  25.                 System.Diagnostics.Process.Start("http://yy.com/91283328/2175343697?from=");//打开网页YY
  26.             }
  27.             else
  28.             {
  29.                 System.Diagnostics.Process.Start("yy://pd-[sid=91283328&subid=2175343697]");//打开软件YY
  30.             }
  31.         }
  32.     }
  33. }
复制代码

评分

参与人数 1V币 +1 收起 理由
faunus + 1 (V币)课程报名、录像学习、代码练习跟贴.

查看全部评分

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
发表于 2014-3-10 11:55:35 | 只看该作者

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-4-29 08:42 , Processed in 0.087326 second(s), 26 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表