文件名称:使用绝对地址来做闪屏
文件大小:3KB
文件格式:TXT
更新时间:2013-03-26 08:07:18
使用绝对地址来做闪屏
private void Form1_Load(object sender, EventArgs e) { label2.Text = "欢迎使用Visual C#.NET程序设计实验平台"; label2.Text = label2.Text + "本软件适用于初学Visual C#.NET程序设计的朋友"; timer1.Start(); } private void timer1_Tick(object sender, EventArgs e) { if (this.progressBar1.Value == 100) { Bitmap p = new Bitmap(@"D:\homework\C#\WindowsApplication2\WindowsApplication2\Resources\1.jpg"); this.BackgroundImage = p; } if (this.progressBar1.Value == 200) { Bitmap p = new Bitmap(@"D:\homework\C#\WindowsApplication2\WindowsApplication2\Resources\2.jpg"); this.BackgroundImage = p; } if (this.progressBar1.Value == 300) { Bitmap p = new Bitmap(@"D:\homework\C#\WindowsApplication2\WindowsApplication2\Resources\3.jpg"); this.BackgroundImage = p; label2.ForeColor = Color.Blue; label2.Text = "本实验软件在每个程序中包含了两个实验,一个是基础实验,一个是提高实验"; label2.Text = label2.Text + "每个实验找那个的基础实验向你展示了本章实验内容的基本应用,提高实验向你展示了本章一些实验内容的加深!"; } if (progressBar1.Value == 400) { Bitmap p = new Bitmap(@"D:\homework\C#\WindowsApplication2\WindowsApplication2\Resources\4.jpg"); this.BackgroundImage = p; } if (progressBar1.Value == 450) { Bitmap p = new Bitmap(@"D:\homework\C#\WindowsApplication2\WindowsApplication2\Resources\5.jpg"); this.BackgroundImage = p; label2.ForeColor = Color.DarkRed; label2.Text = "欢迎使用,闪屏实验测试结束!"; } if (progressBar1.Value < 500) { this.progressBar1.Value+=10; } else { this.timer1.Stop(); return; } } } }