System.Windows.Forms.WebBrowser -> settings AllowWebBrowserDrop and ScrollBarsEnabled to false throws ComException

Günther Humer 1 Reputation point
2022-11-17T10:33:47.047+00:00
	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.'

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,189 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 86,486 Reputation points
    2022-11-17T10:53:14.62+00:00

    You can see this thread : Avoiding WebBrowser Exception
    and the answer from alexms_2001

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.