C#的widows窗体怎么设置动态背景图片
2个回答
展开全部
private Image im;
private void Form1_Load(object sender, EventArgs e)
{
this.im = Image.FromFile(@"C:\aaa.jpg");
Thread t = new Thread(new ThreadStart(this.showback));
t.IsBackground = !t.IsBackground;
t.Start();
}
private void showback()
{
while (true)
{
this.BackgroundImage = this.im;
Thread.Sleep(1000);
this.BackgroundImage = null;
}
}
一个可以闪烁的背景,刚才写着玩的,顺手就拿上来了,请注意里面的图片地址哦。
private void Form1_Load(object sender, EventArgs e)
{
this.im = Image.FromFile(@"C:\aaa.jpg");
Thread t = new Thread(new ThreadStart(this.showback));
t.IsBackground = !t.IsBackground;
t.Start();
}
private void showback()
{
while (true)
{
this.BackgroundImage = this.im;
Thread.Sleep(1000);
this.BackgroundImage = null;
}
}
一个可以闪烁的背景,刚才写着玩的,顺手就拿上来了,请注意里面的图片地址哦。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询