This project presents you a small wrapper class around the Windows Forms 2.0
WebBrowser control control.
The wrapper is no rocket science but provides some features I struggled with in the past. We use the control in several of our own (internal) applications.
Some of the features include:
IExternalInformationProviderfor externally persisting and restoring settings.
To include the code in your own project, simply include the "ZetaHtmlEditControl.dll" assembly into your project.
Add the assembly to your Visual Studio .NET 2008 Windows Forms Designer Toolbox if you want to be able to drag the
ExtendedWebBrowser control to your forms. Alternatively create and initialize an instance of the ExtendedWebBrowser control by code.
To put HTML from your code into the control, assign the HTML code to the
ExtendedWebBrowser.DocumentText property. You do not have to pass a complete HTML document with
BODY tags but only the actual content that you would write inside the
To read out the HTML from the control, call the
ExtendedWebBrowser.GetDocumentText( string folderPath ) method. The method takes one parameter "folderPath" that tells the control where to store newly passed images from the clipboard.
You need to have the
<NetFx40_LegacySecurityPolicy enabled="true" /> switch inside your application's configuration file in order to use the control within .NET 4. E.g. something like that:
<?xml version="1.0"?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> <runtime> <loadFromRemoteSources enabled="true" /> <NetFx40_LegacySecurityPolicy enabled="true" /> </runtime> </configuration>