设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

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

【作业】01课-小影

[复制链接]
跳转到指定楼层
1#
发表于 2014-3-7 23:07:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 小影 于 2014-3-7 23:16 编辑
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Microsoft.Office.Tools.Ribbon;
  6. using System.Diagnostics;
  7. using System.Windows.Forms;

  8. namespace PowerPointAddIn1
  9. {
  10.     public partial class Ribbon1
  11.     {
  12.         private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
  13.         {

  14.         }

  15.         private void button1_Click(object sender, RibbonControlEventArgs e)
  16.         {
  17.             Process pro = new Process();
  18.             ProcessStartInfo proStartInfo = new ProcessStartInfo("notepad.exe");
  19.             proStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
  20.             pro.StartInfo = proStartInfo;
  21.             pro.Start();
  22.            
  23.         }

  24.         private void buttonOpenYY_Click(object sender, RibbonControlEventArgs e)
  25.         {
  26.             if (!checkBoxOpenYY.Checked)
  27.             {
  28.                 //在这里打开软件YY
  29.                 try
  30.                 {
  31.                     Process.Start("yy://pd-[sid=91283328&subid=2175343697]");
  32.                 }
  33.                 catch (Exception ex)
  34.                 {
  35.                     MessageBox.Show("亲,你没有安装YY,请下载安装");
  36.                     throw;
  37.                 }
  38.             }
  39.             else
  40.             {
  41.                 //在这里打开网页YY
  42.                 try
  43.                 {
  44.                     Process.Start("http://yy.com/91283328/2175343697?from=");
  45.                 }
  46.                 catch (Exception ex)
  47.                 {
  48.                     MessageBox.Show("打开错误!");
  49.                     throw;
  50.                 }
  51.             }
  52.         }
  53.     }
  54. }
复制代码
我有个好同桌。。。
各位节日快乐,辛苦了。。。

评分

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

查看全部评分

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
推荐
发表于 2014-3-7 23:37:24 | 只看该作者
本帖最后由 紫电 于 2014-3-7 23:57 编辑


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 1 反对 0

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-29 13:09 , Processed in 0.102018 second(s), 28 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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