I am trying to minimize the Microsoft Edge browser through C#. All the other browsers like Chrome, Firefox, Internet Explorer are working fine except Microsoft Edge.

Can anybody please help me on this.

Here is my code.

```
   [DllImport("user32.dll")]
    static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
    static void Main(string[] args)
    {

        var processes = Process.GetProcessesByName("MicrosoftEdge");
        //var processes = Process.GetProcessesByName("chrome");

         foreach (var process in processes)
            ShowWindow(process.MainWindowHandle, 2);
    }

```

You can try uncommenting Chrome process it is working.