Office中国论坛/Access中国论坛
标题:
【作业】01课-Jiakun2014
[打印本页]
作者:
Jiakun2014
时间:
2014-3-5 04:45
标题:
【作业】01课-Jiakun2014
代码如下:
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.");
}
}
}
}
}
复制代码
动画效果:
[attach]53323[/attach]
作者:
紫电
时间:
2014-3-7 23:18
[attach]53396[/attach]
符合题意,正确
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3