|
代码如下:
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Microsoft.Office.Tools.Ribbon;
- using System.Diagnostics;
- namespace WordAddIn
- {
- public partial class TestRibbon
- {
- private void TestRibbon_Load(object sender, RibbonUIEventArgs e)
- {
- }
- private void button1_Click(object sender, RibbonControlEventArgs e)
- {
- Process myProcess = new Process();
- ProcessStartInfo myProStartInfo = new ProcessStartInfo("notepad.exe");
- myProcess.StartInfo = myProStartInfo;
- myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
- myProcess.Start();
- }
- private void chkYY_Click(object sender, RibbonControlEventArgs e)
- {
- if (chkYY.Checked)
- {
- Process.Start("http://yy.com/91283328/91283328?from=769333290");
- }
- else {
- try
- {
- Process.Start("yy://pd-[sid=91283328&subid=2175343697]");
- }
- catch {
- System.Windows.Forms.MessageBox.Show("No YY Installed.");
- }
- }
- }
- }
- }
复制代码
动画效果:
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
评分
-
查看全部评分
|