Getting Started with .net windows form HTML editor control

Once you have downloaded the zip file for the .net windows form HTML editor control from our website, you just need to add the control to your visual studio toolbox, drag and drop an instance of the control to your Windows Form and you are ready to go.

Please make sure that your hosting application targets either .NET 2.0, 3.0 (full), 3.5, 4 (full), 4.5,4.5.1. BUT NOT 3.5 Client Profile and 4.0 Client Profile. This control will not work with Client Profile targets.

Step 0: As soon as you download the zip file from our website, please right click on the file, select Properties and then, Click the Unblock button.

If you don't do so, visual studio will throw Build Error using these DLLs. If you don't see the Unblock button from Properties dialog, then, don't worry about that. Perhaps, your operating system has already got it unblocked.

unblock

Step 1: Within your Visual Studio, please select the Tools menu -> Choose Toolbox Items

Step 2: Click Browse button to locate the Control DLL within the "Main Control DLL" folder (Once you unzipped the downloaded file).

Step 3: Browse the folder named "Main Control DLL”. Then choose the file named 'WinFormHtmlEditor.dll' within the specific .NET Framework version. For example, if your application is targeted to .NET 4.0, then, get the dll from subfolder named .NET 4.0.

Step 4: Once you select the DLL, .NET Framework Components tab will be populated with this new control and it will be selected automatically. Click "OK” to finally add this control to your toolbox.

step 4

Step 5: Once the control is added to your toolbox, drag and drop the control into your form.

Step 6: You may find that, Microsoft.mshtml.dll file is automatically referenced to your project. Please select that reference and right click to get Properties menu. Click the properties menu.

step 6

Step 7: Now, set Copy Local = True for Microsoft.mshtml.dll so that this dll is also published along with the WinFormHtmlEditor.dll and make sure this dll is available with other deployable assemblies when you create your installer.

step 7

Step 8: If you are targeting your application to .NET 4.0 or later, you may find that the Embed Interop Type for MSHTML.dll is set as True. Please change that to False and after that, set Copy Local = True as mentioned earlier.

embed_interop

Note: If do not see the MSHTML.dll automatically added to your project or if it is missing somehow, then, you will need to add MSHTML.dll as a reference. You can either add the reference from your visual studio reference manager -> COM -> SEARCH for 'microsoft html' and you will find Microsoft HTML Object Library or you will find it in the Main Control DLL folder that you downloaded for this control.

MSHTML_dll_reference

Once you add that MSHTML.dll, follow the same procedure of setting Embedded Interop Type = false and Copy Local = true for this reference.

That's all you need to do in order to get started with the .NET winform HTML editor control.

Last updated on 29 March 2015, Sunday, 10:19:47 AM
If you have any questions or concerns about this tutorial, Please feel free to share your comment.