0

I have an application in Net 7 that open a window application, but if there is the file explorer open, for example, the file explorer keeps in front.

In my case I am trying to open the notepad with this code:

        ProcessStartInfo miProcessStartInfo = new ProcessStartInfo();
        miProcessStartInfo.FileName = "Notepad.exe";
        miProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
        miProcessStartInfo.CreateNoWindow = true;

Thanks.

Clemens
  • 123,504
  • 12
  • 155
  • 268
Álvaro García
  • 18,114
  • 30
  • 102
  • 193
  • you can use [SetWindowPos](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos) and set TOPMOST – styx Jan 04 '23 at 12:33
  • possible duplicate: https://stackoverflow.com/questions/21475710/how-to-make-windows-always-on-top-application – A.B. Jan 04 '23 at 13:11

0 Answers0