使用.NET VS2010的Awesomium(ObjectForScripting)

I'm having some issues finding examples of how to use the Awesomium web browser control in vb.net with objectforscripting. I know that objectforscripting isn't the same for the webcontrol used with awesomium since its HTML5 and not the traditional IE control that comes with vs 2010.

The issue I'm having is finding any info/examples on how to communicate with the awesomium web browser control with my javascript. It's quite easy with the IE built in control with objectforscripting. I've found samples of how to do it in C# but I don't see any info of how I could do it just in VB. I've searched several things in google and I just can't seem to find anything on how to do it.

So for example, I would have a button in a php page that the webcontrol browsers to and if I click the button it closes the application down. So I need to communicate using window.external with the webcontrol in VB.

Well this is how you close the application through your Awesomium Web Browser Control:

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

    WebControl1.CreateObject("Client")
    WebControl1.SetObjectCallback("Client", "SelectItem", AddressOf OnTestCallback)
End Sub
Public Sub OnTestCallback(ByVal sender As Object, ByVal e As Awesomium.Core.JSCallbackEventArgs)
    Select Case e.Arguments(0).ToString().ToUpper()
        Case "EXIT"
            Application.Exit()
    End Select

End Sub

And insert this code to your HTML part of the program.

<button value="" onclick="Client.SelectItem('Exit')">Close</button>

This works for me really fine. I hope that's what you were expecting. ;D