Guest User

Untitled

a guest
Nov 20th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public void Launch()
  2. {
  3. bool error = false;
  4. try
  5. {
  6. Process process = new Process();
  7. process.StartInfo.FileName = """ + fileName+ """;
  8. process.StartInfo.Arguments = " " + arguments;
  9. process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
  10. process.Start();
  11. WindowState = FormWindowState.Minimized;
  12. process.WaitForExit();
  13. }
  14. catch (InvalidOperationException) { error = true; }
  15.  
  16. if(!error)
  17. WindowState = FormWindowState.Maximized;
  18. }
Add Comment
Please, Sign In to add comment