Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Launch()
- {
- bool error = false;
- try
- {
- Process process = new Process();
- process.StartInfo.FileName = """ + fileName+ """;
- process.StartInfo.Arguments = " " + arguments;
- process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
- process.Start();
- WindowState = FormWindowState.Minimized;
- process.WaitForExit();
- }
- catch (InvalidOperationException) { error = true; }
- if(!error)
- WindowState = FormWindowState.Maximized;
- }
Add Comment
Please, Sign In to add comment