Visual Studio Code – Why does .Net change the Process.MainWindowHandle?
I created a new Windows Forms App in Visual Studio and added the following code to it: new Form1().Show(); By calling this code, the Process.MainWindowHandle of my process, reported by Process.GetProcessById(Environment.ProcessId).MainWindowHandle will be changed to the new Form. But if…