Re: Process.Start & Process.Kill
Graeme Hood <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
Yes, I think that is probably what is happening. So looks like I have to automate Outlook to close the message? -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Dean Cleaver Sent: Thursday, 22 March 2007 09:47 To: [email protected] Subject: Re: [DOTNET-WINFORMS] Process.Start & Process.Kill Wild stab, but does starting a process with an extension type of .msg cause Outlook to spawn a new instance, detect the single instance that's allowed and then pass a message to it to open that message, and then exit? Dino -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Graeme Hood Sent: Thursday, 22 March 2007 20:44 To: [email protected] Subject: [DOTNET-WINFORMS] Process.Start & Process.Kill If I Process.Start a pdf file, I can later do Process.Kill and it closes fine. If I do the same with a saved Outlook msg file, the message opens fine, but when I try to kill the process I get an exception because the process has already exited. Can someone please explain the difference, and how I can best close an outlook form that I have opened? proc = Process.Start("MyPdfFile.pdf"); proc.Kill(); <== Works fine proc = Process.Start("MyMessageFile.msg"); proc.Kill(); <== Process already exited. Thanks for any clarification <mailto:[email protected]> This email message is intended only for the use of the named recipient. Information contained in this email message and its attachments may be privileged, confidential and protected from disclosure. If you are not the intended recipient, please do not read, copy, use or disclose this communication to others. Also please notify the sender by replying to this message and then delete it from your system.