I have some fairly straightforward code to open up files using a Process object:
var proc = new Process();
proc.StartInfo.FileName = attachmentPath;
proc.StartInfo.UseShellExecute = true;
proc.Start();
Every once in a while, the window that opens from this process starting open behind all my currently open windows. I don't see any pattern or consistency to why this happens. Does anybody have an idea why this happens, or how I can work around it? Thanks!