Welcome Guest Search | Active Topics | Sign In | Register

WebView Displays improperly on Surface Pro (and Surface Pro 3) Options
howard s
Posted: Wednesday, July 9, 2014 10:13:51 PM
Rank: Newbie
Groups: Member

Joined: 5/30/2012
Posts: 6




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.

eo_support
Posted: Wednesday, July 9, 2014 11:04:10 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Can you try to run Chrome browser and see if you see the same problem? This might have to do with DPI settings.

Thanks!
howard s
Posted: Thursday, July 10, 2014 6:06:06 AM
Rank: Newbie
Groups: Member

Joined: 5/30/2012
Posts: 6
The File Runs/displays fine in Chrome standalone. The problem only shows up when WebView is embedded/launched from within an Excel Add-in running on Surface Pro. FYI, I am using Add-In Express to host the add-in code.
eo_support
Posted: Thursday, July 10, 2014 3:31:00 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Currently we do not have a surface pro debug environment yet since theoretically it is exactly the same as a desktop except for the input module. We will acquire one and try to reproduce the problem after that. In the mean time, you may want to try install our sample app directly on your surface and see if that works, and also try to write a Plug-in without using Add-In Express to see if that works for you.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.