So what I'm trying to do is launch explorer from my program, and then pop up my application back to Explorer or just launch explorer behind my application ...
I currently have an explorer, after which I have actions to bring my application to the foreground, but the explorer may take a few seconds, and this ruined the whole chain of events.
This is what I am doing now:
Process process = new Process(); process.StartInfo.FileName = environmentVariable + "\\explorer.exe"; process.StartInfo.Arguments = !string.IsNullOrEmpty(this.uxMainFolder.Text) ? this.uxMainFolder.Text + "\\" + path2 : Path.Combine("R:\\Project", path2); try { process.Start(); this.WindowState = FormWindowState.Minimized; this.Show(); this.WindowState = FormWindowState.Normal; } finally { process.Dispose(); }
Any light you can shed on this issue will be greatly appreciated.
Edit: I'm looking for some kind of event that I can call TopMost or my minimized / show / normal method after loading explorer.
The program creates a project directory with all the necessary documents for each type of project, this directory pops up in the explorer.
This means a change in the quality of life for users who want to create 10 or 20 projects in one sitting.
source share