I've seen some issues in the past that I needed to upgrade the RichEdit to a higher version, for example look at my answers about selection highlight, or special characters, but I never needed to downgrade.
Anyways, if you want to use a specific version of RichTextBox as suggested in the comments, then you need to load the DLL of that specific version and create the class of the specific version. For example, the following code is for using RichEdit20W
from RichEd20.DLL
library:
Imports System
Imports System.ComponentModel
Imports System.Runtime.InteropServices
Imports System.Windows.Forms
Public Class ExRichText
Inherits RichTextBox
<DllImport("kernel32.dll", EntryPoint:="LoadLibraryW", CharSet:=CharSet.Unicode, SetLastError:=True)>
Private Shared Function LoadLibraryW(ByVal s_File As String) As IntPtr
End Function
Private Shared Function LoadLibrary(ByVal s_File As String) As IntPtr
Dim [module] = LoadLibraryW(s_File)
If [module] <> IntPtr.Zero Then Return [module]
Dim [error] = Marshal.GetLastWin32Error()
Throw New Win32Exception([error])
End Function
Protected Overrides ReadOnly Property CreateParams As CreateParams
Get
Dim cp = MyBase.CreateParams
Try
LoadLibrary("RichEd20.DLL")
cp.ClassName = "RichEdit20W"
Catch
End Try
Return cp
End Get
End Property
End Class
If you want to adjust the rich edit to use specific version, you can use the following classes and dlls based on what I see in source code of RichTextBox:
Public Class RichEditConstants
Public Const RICHEDIT_DLL10 As String = "RichEd32.DLL"
Public Const RICHEDIT_DLL20 As String = "RichEd20.DLL"
Public Const RICHEDIT_DLL30 As String = "RichEd20.DLL"
Public Const RICHEDIT_DLL41 As String = "MsftEdit.DLL"
Public Const RICHEDIT_CLASS10A As String = "RICHEDIT"
Public Const RICHEDIT_CLASS20W As String = "RichEdit20W"
Public Const RICHEDIT_CLASS30W As String = "RichEdit20W"
Public Const RICHEDIT_CLASS41W As String = "RICHEDIT50W"
End Class