We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Is there a way to make webBrowser.size dynamic?

Accepted answer
2
Views
2
Comments
edited Oct 18, 2017 9:56PM in Integrations and APIs 2 comments

Content

Release May 2017

Problem: An add-in that uses a webBrowser is not showing full width as it did in the prior version (May 2015).

Version

May 2017

Code Snippet

             this.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.Dock = DockStyle.Fill;
this.Anchor = AnchorStyles.Top | AnchorStyles.Left;
this.webBrowser = new WebBrowser();
this.webBrowser.TabIndex = 2;
this.Controls.Add(this.webBrowser);
this.webBrowser.Location = new System.Drawing.Point(0, 0);
this.webBrowser.Size = new System.Drawing.Size(750, 525);
this.webBrowser.ScrollBarsEnabled = true;
<Code to build parms>
string oEmpty = "";
string QueryParams = String.Format(<parameters>);
string vHeaders = "Content-Type: application/x-www-form-urlencoded" + "\n" + "\r";
byte[] vPost = System.Text.UTF8Encoding.UTF8.GetBytes(QueryParams);
webBrowser.Navigate(new Uri(<URL>), oEmpty, vPost, vHeaders); 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!