Start Process
Process[] oeProcess = Process.GetProcessesByName("msimn");
if (oeProcess == null || oeProcess.Length == 0) {
try {
string oeExeFile =
string.Format(@"{0}\Outlook Express\msimn.exe", Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));
if (File.Exists(oeExeFile)) {
Process process = Process.Start(oeExeFile);
Thread.Sleep(7*1000);
} else {
MessageBox.Show("Start Outlook Express failure , for Outlook Express is not exist !");
return false;
}
} catch (Exception exp) {
throw new Exception("Start Outlook Express failure , for "+exp.Message,exp);
}
}
return true;
if (oeProcess == null || oeProcess.Length == 0) {
try {
string oeExeFile =
string.Format(@"{0}\Outlook Express\msimn.exe", Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles));
if (File.Exists(oeExeFile)) {
Process process = Process.Start(oeExeFile);
Thread.Sleep(7*1000);
} else {
MessageBox.Show("Start Outlook Express failure , for Outlook Express is not exist !");
return false;
}
} catch (Exception exp) {
throw new Exception("Start Outlook Express failure , for "+exp.Message,exp);
}
}
return true;
Start Thread
ThreadStart threadStart = new ThreadStart(ImageAutoWatch);
imageWatchThread = new Thread(threadStart);
imageWatchThread.Start();
imageWatchThread = new Thread(threadStart);
imageWatchThread.Start();

浙公网安备 33010602011771号