John Lyons

John Lyons

  • NA
  • 34
  • 10k

Displaying a Web Page on a Mobile 6 Device

Jan 7 2011 2:09 PM
Hi all,

We have a mobile 6 app written in VB.NET that allows the user to view a specific web page.  We navigate to the web page using the CF web browser control and the navigate method.  What is happening is that the page will load and to get it to display on the screen you need to tap the screen.  The web browser control is created only when this view comes into view, meaning the user says to display this view.  Here is what I am doing:

this is done in the loading of this view

        'imgPicture
        imgPicture.Location = New System.Drawing.Point(1, 1)
        imgPicture.Name = "imgPicture"
        imgPicture.Size = New System.Drawing.Size(238, 297)

        MainScreen.pnMainScreen.Controls.Add(imgPicture)
        AddHandler imgPicture.DocumentCompleted, AddressOf RefreshURL
        imgPicture.Navigate(New Uri(<SOME URL>), "imgPicture")

Here is the document loaded event that is getting fired so I know the page has loaded

    Private Sub RefreshURL(ByVal sender As Object, ByVal e As EventArgs)
        imgPicture.ScriptErrorsSuppressed = True
        'imgPicture.BringToFront()
        'imgPicture.Invalidate()
        'imgPicture.Update()
    End Sub

Any help is appreciated.

Thanks

John