Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2019 Community toolbox has no webbrowser control

My Visual Studio toolbox

I have a WinForms app, when I design a form, the toolbox shows no webbrowser control. The framework is .NET 5.0. I use Visual Studio 2019 Community latest version v16.8.6, as shown in the screenshot.

Can anyone help me?

like image 698
ZhengGuo.Huang Avatar asked Nov 22 '25 19:11

ZhengGuo.Huang


1 Answers

I have VS 2022 and .NET 6.0 and it is not in the toolbox there either. I was able to add it by editing the MyForm.Designer.cs file. There are 4 sections of the file that I added code to. this.webBrowser1 = new System.Windows.Forms.WebBrowser();

        // 
        // webBrowser1
        // 
        this.webBrowser1.Location = new System.Drawing.Point(1064, 24);
        this.webBrowser1.Margin = new System.Windows.Forms.Padding(5, 3, 5, 3);
        this.webBrowser1.MinimumSize = new System.Drawing.Size(27, 27);
        this.webBrowser1.Name = "webBrowser1";
        this.webBrowser1.Size = new System.Drawing.Size(405, 506);
        this.webBrowser1.TabIndex = 27;

this.Controls.Add(this.webBrowser1);

private System.Windows.Forms.WebBrowser webBrowser1;

like image 183
Imac0818 Avatar answered Nov 24 '25 10:11

Imac0818



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!