Click here to Skip to main content
15,902,938 members
Home / Discussions / C#
   

C#

 
Generalre-using old code. C++, Fortran Pin
Ylno1-Feb-08 8:40
Ylno1-Feb-08 8:40 
GeneralRe: re-using old code. C++, Fortran Pin
Dan Neely1-Feb-08 9:00
Dan Neely1-Feb-08 9:00 
GeneralRe: re-using old code. C++, Fortran Pin
Ylno1-Feb-08 9:12
Ylno1-Feb-08 9:12 
GeneralRe: re-using old code. C++, Fortran Pin
Dan Neely1-Feb-08 10:19
Dan Neely1-Feb-08 10:19 
GeneralRe: re-using old code. C++, Fortran Pin
Ylno1-Feb-08 11:07
Ylno1-Feb-08 11:07 
GeneralRe: re-using old code. C++, Fortran Pin
led mike1-Feb-08 9:25
led mike1-Feb-08 9:25 
GeneralRe: re-using old code. C++, Fortran Pin
Ylno1-Feb-08 11:10
Ylno1-Feb-08 11:10 
QuestionProcess.HasExited and Process.WaitForExit() in C# Pin
danielhasdibs1-Feb-08 8:35
danielhasdibs1-Feb-08 8:35 
I've got a serious problem with these two. In short, they aren't working or I'm not doing it right (I'm hoping it's the latter).

I am trying to open a Word document. After the user closes the Word document, I want to start another process (namely, a web address). Every time, the processes open one after the other -- without pausing or anything. Here is the code I have (and I have tried various rearrangements):

System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();<br />
                                    psi.RedirectStandardOutput = true;<br />
                                    psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized;<br />
                                    psi.UseShellExecute = false;<br />
                                    psi.Arguments = @txt_Wordfile.Text;<br />
                                    psi.FileName = @WordExe];<br />
                                    <br />
                                    System.Diagnostics.Process WordProcess = new System.Diagnostics.Process();<br />
                                    <br />
                                    WordProcess = System.Diagnostics.Process.Start(psi);<br />
                                    WordProcess.EnableRaisingEvents = true;<br />
                                    WordProcess.WaitForExit();<br />
                                    <br />
                                    System.Diagnostics.Process.Start(txt_website.Text);



Even in debug mode, it shows WordProcess.HasExited == true right after the process starts.
Also, the window does not open maximized.
Please help! Thanks!
GeneralRe: Process.HasExited and Process.WaitForExit() in C# Pin
Skippums1-Feb-08 9:44
Skippums1-Feb-08 9:44 
GeneralRe: Process.HasExited and Process.WaitForExit() in C# Pin
danielhasdibs1-Feb-08 9:57
danielhasdibs1-Feb-08 9:57 
Generalsubversion Pin
damianrda1-Feb-08 7:11
damianrda1-Feb-08 7:11 
GeneralRe: subversion Pin
Ed.Poore1-Feb-08 7:40
Ed.Poore1-Feb-08 7:40 
GeneralRe: subversion Pin
Mark Churchill1-Feb-08 14:06
Mark Churchill1-Feb-08 14:06 
QuestionParsing Exception? Pin
kumar.bs1-Feb-08 6:42
kumar.bs1-Feb-08 6:42 
GeneralDatabinding listbox Pin
Jacob Dixon1-Feb-08 5:39
Jacob Dixon1-Feb-08 5:39 
GeneralRe: Databinding listbox Pin
Not Active1-Feb-08 5:49
mentorNot Active1-Feb-08 5:49 
QuestionRe: Databinding listbox Pin
Jacob Dixon1-Feb-08 7:56
Jacob Dixon1-Feb-08 7:56 
GeneralRe: Databinding listbox Pin
Not Active1-Feb-08 8:45
mentorNot Active1-Feb-08 8:45 
GeneralStreaming With Flash media Encoder Pin
kibromg1-Feb-08 5:38
kibromg1-Feb-08 5:38 
GeneralRe: Streaming With Flash media Encoder Pin
Pete O'Hanlon1-Feb-08 9:42
mvePete O'Hanlon1-Feb-08 9:42 
QuestionBinding XML to TreeView - can't get it working? Pin
espeholt_jr1-Feb-08 4:44
espeholt_jr1-Feb-08 4:44 
General.net 2.0 multi selection drop down Pin
arkiboys1-Feb-08 4:03
arkiboys1-Feb-08 4:03 
GeneralRe: .net 2.0 multi selection drop down Pin
Bijesh1-Feb-08 4:44
Bijesh1-Feb-08 4:44 
GeneralLinkedList XML serialization problem Pin
Kosomot1-Feb-08 3:55
Kosomot1-Feb-08 3:55 
GeneralRe: LinkedList XML serialization problem Pin
Skippums1-Feb-08 5:17
Skippums1-Feb-08 5:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.