29 lines
694 B
C#
29 lines
694 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace TBAppraisalTools.重绘
|
|||
|
{
|
|||
|
class MyPictureBox : PictureBox
|
|||
|
{
|
|||
|
protected override void WndProc(ref Message m)
|
|||
|
{
|
|||
|
if (m.Msg == 0x0014) // 禁掉清除背景消息
|
|||
|
return;
|
|||
|
base.WndProc(ref m);
|
|||
|
}
|
|||
|
protected override CreateParams CreateParams
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
var parms = base.CreateParams;
|
|||
|
parms.Style &= ~0x02000000; // Turn off WS_CLIPCHILDREN
|
|||
|
return parms;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|