Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Just create a new Control. It works fine for me.</p> <pre><code>using System; using System.ComponentModel; using System.Windows.Forms; using System.Runtime.InteropServices; public class RichTextBox5 : RichTextBox { private static IntPtr moduleHandle; protected override CreateParams CreateParams { get { if (moduleHandle == IntPtr.Zero) { moduleHandle = LoadLibrary("msftedit.dll"); if ((long)moduleHandle &lt; 0x20) throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not load Msftedit.dll"); } CreateParams createParams = base.CreateParams; createParams.ClassName = "RichEdit50W"; if (this.Multiline) { if (((this.ScrollBars &amp; RichTextBoxScrollBars.Horizontal) != RichTextBoxScrollBars.None) &amp;&amp; !base.WordWrap) { createParams.Style |= 0x100000; if ((this.ScrollBars &amp; ((RichTextBoxScrollBars)0x10)) != RichTextBoxScrollBars.None) { createParams.Style |= 0x2000; } } if ((this.ScrollBars &amp; RichTextBoxScrollBars.Vertical) != RichTextBoxScrollBars.None) { createParams.Style |= 0x200000; if ((this.ScrollBars &amp; ((RichTextBoxScrollBars)0x10)) != RichTextBoxScrollBars.None) { createParams.Style |= 0x2000; } } } if ((BorderStyle.FixedSingle == base.BorderStyle) &amp;&amp; ((createParams.Style &amp; 0x800000) != 0)) { createParams.Style &amp;= -8388609; createParams.ExStyle |= 0x200; } return createParams; } } // P/Invoke declarations [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)] private static extern IntPtr LoadLibrary(string path); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload