如何在C#里实现图形渐变透明的效果?
解决方案 »
- 用BitConverter.ToString方法得到的字串怎么转?
- C#中SYSTEM.IO有读取记录体的类吗
- datagridview中checkBox列的问题
- 关于执行CMD命令
- 用 axWebBrowser 获取打开网页的源代码,总是只能取一部分????
- 紧急求助!!!!!?使用treeview的checkboxes所遇到的问题?三天了还没解决急用!!!
- 请兄弟们帮忙看看UpdateDataSet不能更新的问题
- ASP.NET 时间控件,不要日期的。有没有现成的
- 打印标签正确走纸!急,试用期马上到了,不能解决就回家了?
- vs2005 不支持查看AMD双核处理器上的寄存器? 该怎么办?
- 我的devenv.exe被norton报警了,我不小心选了永远禁止。。怎么办?
- 如何在显示Form时,把Form背景色从上到下逐渐变化?
System.Drawing.Brush line=new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(10,60,180,20),Color.Blue,Color.White,90);
g.FillRectangle(line,new Rectangle(10,60,180,20));
line.Dispose();要这样的?
private double opacityIncrement = 0.1;
private const int changeInterval = 25;
private Timer timer1; //表单载入
private void Form1_Load(object sender, System.EventArgs e)
{ timer1=new Timer();
timer1.Interval=changeInterval;
timer1.Tick+=new System.EventHandler(this.timer1_Tick);
this.Opacity=0;
timer1.Start();
} //渐显事件
private void timer1_Tick(object sender, System.EventArgs e)
{
this.timer1.Stop();
if(this.Opacity<1)
{
this.Opacity=this.Opacity+this.changeInterval;
}
else
{
this.timer1.Enabled=false;
}
this.timer1.Start();
}
参考System.Drawing.Graphics类
是图片
通过
Bitmap bitmap = new Bitmap(图片目录);
让图片bitmap 渐变透明to :Artex_xh(一团矛盾)
能不能具体点啊...我找了很久,没也找出相应的方法来..