继承Panel控件然后重写方法
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace DynamicAndStaticImage
{
public class MyPanel : Panel
{
public MyPanel()
{
this.SetStyle(ControlStyles.SupportsTransparentBackColor |
ControlStyles.Opaque, true);
this.BackColor = Color.Transparent;
}
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle = 0x20;
return cp;
}
}
}
}
截图是视频播放,视频控件右键是flash自带的右键,不能设置为自己需要的右键,再flash上面添加一个透明的panel控件,然后panel设置自己的右键