Minimize Microsoft Edge browser from C# not working -


i trying minimize microsoft edge browser through c#. other browsers chrome, firefox, internet explorer working fine except microsoft edge.

can please me on this.

here 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 working.

as can verify, process you're looking @ has no main window. it's handle 0. you're not minimising anything.

uwp apps (or can be) bit different normal win32 applications. while edge content processes have window title, cannot minimise edge using window handle either. actual process window belongs applicationframehost. may need filter main window title appropriately if there multiple of them.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -