You can see this thread : Avoiding WebBrowser Exception
and the answer from alexms_2001
System.Windows.Forms.WebBrowser -> settings AllowWebBrowserDrop and ScrollBarsEnabled to false throws ComException
Günther Humer
1
Reputation point
public WebBrowser myBrowser;
public Form1()
{
InitializeComponent();
myBrowser = new WebBrowser();
myBrowser.AllowWebBrowserDrop = false;
myBrowser.ScrollBarsEnabled = false;
}
System.Runtime.InteropServices.COMException: 'Error HRESULT E_FAIL has been returned from a call to a COM component.'
1 answer
Sort by: Most helpful
-
Castorix31 86,486 Reputation points
2022-11-17T10:53:14.62+00:00