I'm trying to create a program which scrolls through files located on my computer and displays the files. This is working for me so far but I'm getting content in actual size so the webbrowser adds a scrollbar(obviously). I want the content to scale automatically so it fits in the webbrowser without having to scroll.
Code:
WebBrowser web = new WebBrowser();
System.Drawing.Rectangle workingRectangle = Screen.PrimaryScreen.WorkingArea;
int heightWebcontrol = workingRectangle.Height / 100 * 85;
int widthwebControl = workingRectangle.Width / 100 * 75;
web.Size = new Size(widthwebControl, heightWebcontrol);
web.Location = new Point(0, 0);
web.Navigate(fileName);
this.Controls.Add(web);
Large image in webbrowser, this is just 1/5th of the image:
So basicly, this large image, needs automatically to be scales so it fits the browser exactly.
Thanks guys.