Using the HTML Editor ActiveX in VS.NET winforms
The editor may be used in VB.NET and C# winforms projects in all Visual Studio version and all versions of the dotNet framework.
However, it is not designed for for use with ASP.NET browser based applications.
Creating the control at design time
The HTML editor must be added to your controls toolbox before it can be added to a winForm at design time. Use the following steps to add the control to your IDE.
- Right-Click over the toolbox and select "Customize Toolbox"
- Click the COM components tab and scroll down the list and select rmpHTML.HTMLEd
- Click "OK"
- The control is now at the bottom of your list of available components and may be dragged onto a form.
Please note : if you are using the control on MDI-child forms then you must create the control dynamically for each MDIChild it is being used on. ( see below ). Also, it is necessary to set isAccessContained to true when using the control on winforms, this helps alleviate any indiscrepancies with control focus and databinding integrity ( requires build 3.0.3 ).
|Creating the control dynamically|
1. In the program files directory created during installation ( X:\Program Files\nBit Information Technologies\HTML Editor OCX ) there are compiled .NET wrapper classes for the ActiveX control. These may be re-created at any time using axImp.exe.
|2. In your VB.NET or C# project add a reference to AxrmpHTML.DLL in this directory. |
|3. You may now create the control at runtime.
Dim WithEvents oEd As AxrmpHTML.AxHTMLed
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
oEd = New AxrmpHTML.AxHTMLed
oEd.Top = 1
oEd.Dock = DockStyle.Fill
oEd.UploadImages = True
oEd.Visible = True
oEd.isAccessContained = True
AxrmpHTML.AxHTMLed oEd = new AxrmpHTML.AxHTMLed();
oEd.Top = 0;
oEd.Height = this.Height-15;
oEd.Width = this.Width-30;
oEd.UploadImages = true;
oEd.FTPHost = "nbit.net.au";
oEd.FTPInitDir = "nbit.net.au/www/sample/";
oEd.FTPPassive = true;
oEd.FTPPassword = "sample";
oEd.FTPPort = 21;
oEd.FTPSaveToURL = "http://nbit.net.au/sample/";
oEd.FTPUser = "nBitSample";
oEd.ShowFTPDialog = false;
oEd.DocumentHTML = "TEST";
oEd.Visible = true;
note: To avoid GPL errors when closing dotNet applications containing the editor control you must call the Dispose() ambient method of the control in the form_closed event of all forms containing the control. This applies to both vb.net and C# applications.
private void Form2_FormClosed(object sender, FormClosedEventArgs e)
Private Sub frmCategory2_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
Add to Cart
© nBit Information Technologies 2004-2017. All rights reserved.