You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
906 B
34 lines
906 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Customize.Controls
|
|
{
|
|
public class TransTextBox : RichTextBox
|
|
{
|
|
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
|
|
static extern IntPtr LoadLibrary(string lpFileName);
|
|
|
|
protected override CreateParams CreateParams
|
|
{
|
|
get
|
|
{
|
|
CreateParams prams = base.CreateParams;
|
|
if (LoadLibrary("msftedit.dll") != IntPtr.Zero)
|
|
{
|
|
prams.ExStyle |= 0x020; // transparent
|
|
prams.ClassName = "RICHEDIT50W";// TRANSTEXTBOXW
|
|
}
|
|
return prams;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|