设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

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

【作业】01课-Jiakun2014

[复制链接]
跳转到指定楼层
1#
发表于 2014-3-5 04:45:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
代码如下:
  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. namespace WordAddIn
  8. {
  9.     public partial class TestRibbon
  10.     {
  11.         private void TestRibbon_Load(object sender, RibbonUIEventArgs e)
  12.         {

  13.         }

  14.         private void button1_Click(object sender, RibbonControlEventArgs e)
  15.         {

  16.             Process myProcess = new Process();
  17.             ProcessStartInfo myProStartInfo = new ProcessStartInfo("notepad.exe");
  18.             myProcess.StartInfo = myProStartInfo;
  19.             myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
  20.             myProcess.Start();

  21.         }

  22.         private void chkYY_Click(object sender, RibbonControlEventArgs e)
  23.         {
  24.             if (chkYY.Checked)
  25.             {
  26.                 Process.Start("http://yy.com/91283328/91283328?from=769333290");
  27.             }
  28.             else {
  29.                 try
  30.                 {
  31.                     Process.Start("yy://pd-[sid=91283328&subid=2175343697]");
  32.                 }
  33.                 catch {
  34.                     System.Windows.Forms.MessageBox.Show("No YY Installed.");
  35.                 }
  36.             }

  37.         }
  38.     }
  39. }
复制代码


动画效果:

本帖子中包含更多资源

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

x

评分

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

查看全部评分

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

符合题意,正确

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2024-4-29 11:39 , Processed in 0.086202 second(s), 30 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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