满意答案
xtkxe
2013.12.20
采纳率:49% 等级:12
已帮助:16877人
//自定义控件, 然后在工具箱拖过来用 再把BackColor 设置为Transparent
public partial class TransparentListBox : ListBox
{
public TransparentListBox()
{
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
}
protected override void OnSelectedIndexChanged(EventArgs e)
{
this.Invalidate();
base.OnSelectedIndexChanged(e);
}
protected override void OnPaint(Pa