首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

请教pictureBox框怎么让背景透明啊

2012-04-16 
请问pictureBox框如何让背景透明啊??加载的是透明的GIF图片,想用它做图层[解决办法]如果图层,最好还是自己

请问pictureBox框如何让背景透明啊??
加载的是透明的GIF图片,想用它做图层

[解决办法]
如果图层,最好还是自己绘制,比如这样:
Bitmap bmp = yourGif as Bitmap;
System.Drawing.Drawing2D.ImageAttribs imgAtt = new System.Drawing.Drawing2D.ImageAttribs();
imgAtt.SetKeyColor(bmp.GetPix(0,0),bmp.GetPix(0,0));
g.DrawImage(具体不记得了。最后要吧这个imgAtt)用上

热点排行