using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;
namespace 懒人程序
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
{
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo();
info.UseShellExecute = true;
Process p;
string path = @"C:\a.txt";
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
StreamReader sr = new StreamReader(fs, Encoding.Default);
string rl;
while ((rl = sr.ReadLine()) != null)
{
info.FileName = rl;
//richTextBox1.AppendText(rl + '\n');
p = Process.Start(info);
sr.Close();
fs.Close();
Application.Exit();
}
}
}
C:\Program Files\Internet Explorer\iexplore.exe