protected override void WndProc(ref Message m) { base.WndProc(ref m); if (m.Msg == 0x0f) { BP_PAINTPARAMS d = new BP_PAINTPARAMS(); pb = NativeMethod.BeginBufferedPaint(hDC, ref rect, BP_BUFFERFORMAT.TopDownDIB, ref d, out phdc); int res = NativeMethod.BufferedPaintSetAlpha(hDC, ref rect, 255); IntPtr r = NativeMethod.SendMessage(hDC, 0x318, hDC.ToInt32(), 4); res = NativeMethod.BufferedPaintSetAlpha(hDC, ref rect, 255); res = NativeMethod.EndBufferedPaint(hDC, true); } }