so im making an app that shows a website in a webbrowser. Pretty basic, but ive rann into a problem.
I need the entire website to be snapped into the webbrowser so i dont scroll around the website, but have everything on 1 screen. Any ideas?
WP8 VB NET SDK Website snapping to webbrowser
Page 1 of 11 Replies - 695 Views - Last Post: 11 July 2014 - 02:06 AM
Replies To: WP8 VB NET SDK Website snapping to webbrowser
#2
Re: WP8 VB NET SDK Website snapping to webbrowser
Posted 11 July 2014 - 02:06 AM
This code will work fine if added to the web browser document complete event, however as soon as the form is resized it will no longer work, so you will need to look into that
Dim webDocument As Size = WebBrowser1.document.Body.ScrollRectangle.Size webDocument = Size.Add(webDocument, New Size(50, 50)) Dim webBrowser As Size = WebBrowser1.Size Dim newSize As String = (Math.Round(Math.Min(webBrowser.Width / webdocument.Width, webBrowser.Height / _ webdocument.Width), 2) * 100).ToString & "%" WebBrowser1.document.Body.Style = "zoom:" & newSize
Page 1 of 1