I'm building a blogging application with gecko-sharp on Windows, but I'm having a really hard time getting a browser preview function to work. I can't get gtkhtml to compile at all, and I can't get webkit to compile with my version of gtk-sharp (2.10.0.0). What I'm left with is Gecko, but I'm getting AccessViolationExceptions left and right. Here's my code:
string MozEnvVar = System.Environment.GetEnvironmentVariable("GECKOSHILLA_BASEPATH");
if (MozEnvVar != null && MozEnvVar.Length != 0)
{
Gecko.WebControl.CompPath = MozEnvVar;
}
Dialog webD = new Dialog();
webD.Title = "test";
Gecko.WebControl wc = new Gecko.WebControl();
webD.VBox.PackStart(wc, true, true, 2);
wc.LoadUrl("
http://www.yahoo.com");
webD.ShowAll();
So, how do I cope with the AccessViolationsExceptions? (Plus, if I can get it working, how do I render a string of HTML rather than a URL?) I will also accept advice on using alternatives to Gecko.
Thanks a bunch!