This is just a short little program demonstrating the Mozilla Gecko
WebControl in mono-basic.

                                                                 BEGIN
PROGRAM
**************************************************************************************************************************************
'GeckoTest.vb for mono-basic
'Compile with the following sequence.(Thanks to Rolf Bjarne Kvinge-2 on mono
forums for the
'compiler sequence)
'vbnc
/r:$MONODIR/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll,$MONODIR/usr/lib/mono/gecko-sharp-2.0/gecko-sharp.dll
GeckoTest.vb


Imports System
Imports Gtk
Imports Gecko

Public Class GeckoApp

    Inherits Gecko.WebControl
      
          Shared Sub Main()
                  Application.Init()

                  Dim win As Window 
                  Dim frame1 As Frame
                  Dim browser As WebControl

                  win = New Window("TinyGecko")
                  win.SetDefaultSize(800, 600)
                 
                  frame1 = New Frame()
                  browser = New WebControl("/tmp/", "GeckoTest")
                  browser.LoadUrl("http://mono-project.com";)

                  frame1.Add(browser)
                  win.Add(frame1)
                  win.ShowAll()

                  AddHandler win.DeleteEvent, AddressOf winDelete

                  Application.Run()
          End Sub

          Shared Sub winDelete(o As Object, args As DeleteEventArgs)
                  Application.Quit()
          End Sub
End Class

*******************************************************************************************************************************
                                                             END PROGRAM 

"Only thing is, every time you try to add different functionality the
compiler complains with things like this:

Error : VBNC99999: Unexpected error: Object reference not set to an instance
of an object, etc., etc.!

This happens when you add a gtk.Entry widget and a Button to clickwhich
takes you to another website!

But anyway this simple code above does work, try it for yourself if your
just learning mono-basic(vbnc)!

-- 
View this message in context: 
http://www.nabble.com/Working-Gecko.WebControl-tp20848744p20848744.html
Sent from the Mono - VB mailing list archive at Nabble.com.

_______________________________________________
Mono-vb mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-vb

Reply via email to