【发布时间】:2011-08-01 08:16:57
【问题描述】:
我正在编写一个程序来监视文件夹并让您知道何时创建了文件。当用户单击确定时,我正在努力打开文件。请给我一些关于如何让Process.Start() 工作的建议,我正在尝试获取文件位置以从e.Fullpath 加载文本文件并在记事本中打开。
private void fileSystemWatcher1_Changed(object sender, FileSystemEventArgs e)
{
DialogResult messageresult = MessageBox.Show("You have a Collection Form: " + e.Name);
if (messageresult == DialogResult.OK)
Process.Start("Notepad.exe", "e.FullPath");
}
【问题讨论】:
标签: c# .net winforms process.start