Hi Jarek,
Here's the relevant code from our updated source code - see if you can apply that to your code somewhere.
Alternatively, you can reach out to Gilad, and ask for an updated version of env & firefly's source code, and you can investigate there and apply the changes selectively to your code.
I don't recommend simply upgrading to the latest firefly & ENV since that would require some testing effort that you may want to avoid
class RichTextBoxV5 : RichTextBox
{
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
static extern IntPtr LoadLibrary(string lpFileName);
static IntPtr _msfteditHandle = IntPtr.Zero;
static bool _msfteditNotFound;
protected override CreateParams CreateParams
{
get
{
var p = base.CreateParams;
if (UseVersion41 && !p.ClassName.Equals("RichEdit50W", StringComparison.InvariantCultureIgnoreCase))
{
if (_msfteditHandle == IntPtr.Zero && !_msfteditNotFound)
{
_msfteditHandle = LoadLibrary("msftedit.dll");
if ((long)_msfteditHandle < 32L)
_msfteditNotFound = true;
}
if (!_msfteditNotFound)
p.ClassName = "RichEdit50W";
}
if (BackColor == Color.Transparent)
p.ExStyle |= 0x20;
return p;
}
}
public RichTextBoxV5()
{
UseVersion41 = true;
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.DetectUrls = false;
}
public override Color BackColor
{
get { return base.BackColor; }
set
{
var x = base.BackColor;
base.BackColor = value;
if (x != value && (value == Color.Transparent || x == Color.Transparent))
RecreateHandle();
}
}
internal protected bool UseVersion41 { get; set; }
}