Click or drag to resize
RichTextBoxEx Class
Extends RichTextBox to allow the underlying RichEdit control to be loaded from either the shared Microsoft Office DLL or the Windows MSFTEDIT.DLL library.
Inheritance Hierarchy

Namespace: TextObjectModel
Assembly: ManagedTOM2 (in ManagedTOM2.dll) Version: 1.0.5577.41188
Syntax
public class RichTextBoxEx : RichTextBox

The RichTextBoxEx type exposes the following members.

Constructors
  NameDescription
Public methodRichTextBoxEx
Initialises a new instance of the RichTextBoxEx class.
Top
Methods
  NameDescription
Public methodStatic memberLoadFrom
Creates a RichTextBoxEx by loading a specific version of the native RichEdit control from the specified DLL.
Top
Properties
  NameDescription
Public propertyCreateParams
Gets the required creation parameters when the control handle is created.
(Overrides RichTextBoxCreateParams.)
Top
Remarks

During its initial creation, the control will attempt to locate a Microsoft Office shared DLL containing the desired RichEdit control. If this fails (either because Office is not installed or the DLL is for a different processor architecture), it will try MSFTEDIT.DLL instead.

In order to utilise the Microsoft Office implementation, the caller must have read access for following registry key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs - this may not be available in sandboxed environments.

Important: The processor architecture of the Microsoft Office installation must match that of the calling process. If both the 32-bit and 64-bit versions of Office are installed, the control will attempt both DLLs until it finds a suitable match.

After loading the libraries into memory, it will then select the highest version of the RichEdit control that is available. It will select from the following window class names (in order of preference):

  • RICHEDIT60W (RichEdit 6.0 / Office 2007 and higher)
  • RICHEDIT50W (RichEdit 4.1)
  • RICHEDIT20W (RichEdit 2.0)
See Also