2

How would you set a program to become the topmost application using Process.Start or something along those lines

Any help would be appreciated!

x06265616e
  • 804
  • 11
  • 14
  • you need to make it TopMost application or you need to set focus temporarily to another application? – nawfal Oct 28 '12 at 19:13
  • 2
    Nothing close to "Process.Start or something along those lines". An EXE is never top-most, a window is. It requires pinvoke, SetWindowPos() with HWND_TOPMOST. Finding the correct window handle is the typical problem. – Hans Passant Oct 28 '12 at 19:16

1 Answers1

2

After starting the proccess, I would start by getting the window handle of that process

Then, I would use SetWindowPos to set it to be the topmost

Notice that this requires using PInvoke. The 3 links should point you in the right direction.

Community
  • 1
  • 1
Blachshma
  • 16,379
  • 4
  • 51
  • 66