Jump to content

Help Webkit Browser In Vb 2010


Recommended Posts

Hey guys i need your help im trying to make my own web browser in vb 2010 using webkit.net(http://webkitdotnet.sourceforge.net/). but i keep getting this error An error occurred creating the form. See Exception.InnerException for details. The error is: Failed to initialize activation context. and in the immediate window it says A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in WebKitBrowser.dll. And i have no clue how to fix it plz help me!!!

Here is my code:

Public Class Form1

// sub for creating tabs

Public Sub AddTab(ByRef URL As String, ByRef BrowserTab As TabControl) <----- I also get Failed to initialize activation context error here

Dim New_Web_Browser As New Tabbed_webkit_browser

Dim NewTab As New TabPage

New_Web_Browser.Tag = NewTab

NewTab.Tag = New_Web_Browser

TabControl1.TabPages.Add(NewTab)

NewTab.Controls.Add(New_Web_Browser)

New_Web_Browser.Dock = DockStyle.Fill

New_Web_Browser.Navigate("http://www.google.com")

End Sub

//what happens when the fourm loads

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

AddTab("http://www.google.com/", TabControl1)

End Sub

//what happens when you press the back button

Private Sub back_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles back.Click

Dim SWB As Tabbed_webkit_browser = Me.TabControl1.SelectedTab.Tag

SWB.GoBack()

End Sub

//what happens when you press the forward button

Private Sub forward_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles forward.Click

Dim SWB As Tabbed_webkit_browser = Me.TabControl1.SelectedTab.Tag

SWB.GoForward()

End Sub

//the button for adding a new tab

Private Sub newtab_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles newtab.Click

AddTab("www.google.com", TabControl1)

End Sub

//the go button

Private Sub go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles go.Click

Dim SWB As Tabbed_webkit_browser = Me.TabControl1.SelectedTab.Tag

SWB.Navigate(ToolStripTextBox1.Text)

End Sub

End Class

//the browser class

Public Class Tabbed_webkit_browser

Inherits WebKit.WebKitBrowser

Private Sub Tabbed_webkit_browser_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles Me.DocumentCompleted

Form1.Text = "Tabbed Webkit Browser - " + Me.DocumentTitle

Dim TB As TabPage = Me.Tag

If Me.DocumentTitle.Length > 15 Then

TB.Text = Me.DocumentTitle.Substring(0, 14) & "..."

Else

TB.Text = Me.DocumentTitle

End If

End Sub

End Class

Thanks for help guys!! :)

Link to comment
Share on other sites

VB 2010 require a certain level of .net to be installed? I've not messed with VB stuff in like, what since 2002 maybe, and mainly because everything went from VB6 to .net based stuff. I can't tell you about the errors, better to google for that, but make sure you have all the dependencies ahead of time. With anything VB related, half of all the old errors I ran into were missing runtimes or libraries, or you needed the latest update, ie:.net 4.0 vs .net 2.5 for example but I am not saying in your case that is the issue, just something to think about.

I would start here first - http://webkitdotnet....ge.net/reqs.php then start googling for specific errors, and if they have any kind of return codes try digging them up specifically.

if they come with a basic example form or "hello world" example, try seeing if that works first. If it doesn't, then something probably isn't installed that is required.

Edited by digip
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...