Here is the code I am using. It is a simple form application; the form contains a single Picture Box named "ACP_PICKBOX_WB." It loads an html string from a file and displays it in a WebView, following one of your code examples.
Code: Visual Basic.NET
Imports EO.WebBrowser
Imports System.IO
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
RegisterEOBrowserLicenseKey()
Dim lv_HTML As String = renderXMLtoHTML()
displayWebView(lv_HTML)
End Sub
Private Sub WebView_InvokeTest(sender As Object, e As JSExtInvokeArgs)
Dim lv_Response As String = "Hello from a TEST"
e.ReturnValue = lv_Response
End Sub
Public Function renderXMLtoHTML() As String
Dim lv_Result As String = File.ReadAllText("F:\ARCATRE_HTML.txt")
Return lv_Result
End Function
Public Sub displayWebView(p_HTML As String)
Dim lv_EOWEbView = New EO.WebBrowser.WebView
lv_EOWEbView.RegisterJSExtensionFunction("invokeTest", New JSExtInvokeHandler(AddressOf WebView_InvokeTest))
lv_EOWEbView.Create(ACP_PICBOX_WB.Handle)
lv_EOWEbView.LoadHtml(p_HTML)
Me.Show()
End Sub
Private Sub RegisterEOBrowserLicenseKey()
EO.WebBrowser.Runtime.AddLicense( _
"key is here"
End Sub
End Class
This works fine and displays the expected page, which is a form, properly on any number of devices running windows 7 or windows 8/8.1. However, if I use it on a Surface Pro (1 or 3) the top and right portions of the page are truncated. Further, there are buttons on the form, and while they do appear, their mouseover locations are about an inch below the actual button images. This only occurs on Surface Pro or Surface Pro 3. They are running Windows 8.1. Any idea what might be causing this behavior? I have png screen images that illustrate the problem, but I don't know how to load them up to this site. (Note that I am using the form and displaying it in an Excel Add-In; but, again, the problem only occurs when running on a Surface.) Any help appreciated.