This issue was related to UWP app and c# console application.
I made a simple server by using c# console application. And my UWP will run in full-screen mode and connect to it.
My console application will start a process to open the edge browser and do someting.
As the UWP app was running in full-screen mode, the edge browser did not open in front of my UWP app. It just shows in the task bar. For making the edge show on top, I have to move my mouse to the bottom of the screen and click the edge in task bar.
I have tried the win32 APIs.
[DllImport("user32.dll")] public static extern int ShowWindow(IntPtr hWnd, uint nCmdShow); public static extern bool SetForegroundWindow(IntPtr hWnd); public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
It only worked on the desktop computer. If I run my UWP and console application on laptop, it did not work. Any idea will be appreciated.