Office中国论坛/Access中国论坛
标题:
【作业】01课-徐冬
[打印本页]
作者:
josonxu
时间:
2014-3-8 10:35
标题:
【作业】01课-徐冬
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Tools.Ribbon;
namespace WordAddIn1
{
public partial class Ribbon1
{
private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
{
}
private void button1_Click(object sender, RibbonControlEventArgs e)
{
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo myProStartInfo = new System.Diagnostics.ProcessStartInfo("notepad.exe");
myProcess.StartInfo = myProStartInfo;
myProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
myProcess.Start();
}
private void button2_Click(object sender, RibbonControlEventArgs e)
{
if (this.checkBox1.Checked)//如果勾选
{
System.Diagnostics.Process.Start("http://yy.com/91283328/2175343697?from=");//打开网页YY
}
else
{
System.Diagnostics.Process.Start("yy://pd-[sid=91283328&subid=2175343697]");//打开软件YY
}
}
}
}
复制代码
作者:
紫电
时间:
2014-3-10 11:55
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3