Re: Process.Start & Process.Kill
Adrian Martin <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
Host the Acorbat Reader ActiveX Control on a form and tell it what to do. -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Graeme Hood Sent: 22-March-2007 09:50 To: [email protected] Subject: Re: Process.Start & Process.Kill Looks like Adobe Reader works the same way - if it is aleady open and I launch a pdf file, it gets handed to the existing Adobe window and my process exits, so I can't easily close the file I opened. Back to the drawing board... -----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 09:57 To: [email protected] Subject: Re: [DOTNET-WINFORMS] Process.Start & Process.Kill 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. Johnston Press plc Registered in Scotland no. SC015382 Registered Office: 53 Manor Place, Edinburgh, EH3 7EG Opinions expressed in this email are those of the writer and not the company. E-mail traffic is monitored within Johnston Press and messages may be viewed. This e-mail and any files with it are solely for the use of the addressee(s). If you are not the intended recipient, you have received this e-mail in error. Please delete it or return it to the sender or notify us by email at [email protected]