|
7#
楼主 |
发表于 2014-3-8 13:12:42
|
只看该作者
抄来的,还不明白意思
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Tools.Ribbon;
namespace VSTO第一课作业2新
{
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();
}
}
}
|
|