Download presentation
Presentation is loading. Please wait.
Published byGerald Curtis Modified 6年之前
1
form1 卡拉OK pictureBox1 fish1.bmp pictureBox2 fish2.bmp label1 卡拉OK字幕機
button1 開始播 button2 停止播 timer1 pictureBox1 pictureBox2 private void Form1_Load(…) { timer1.Interval = 30; // 計時器週期設為0.03秒 timer1.Enabled = false; // 關閉計時器 // 兩者重疊(位置相同) pictureBox2.Location = pictureBox1.Location; pictureBox1.Width = 0; }
2
private void timer1_Tick(object sender, EventArgs e)
{ if (chapter == 1) // 播放第1段歌詞 pictureBox1.Image = new Bitmap("fish1.bmp"); pictureBox2.Image = new Bitmap("fish2.bmp"); } else if (chapter == …) // 播放第2段歌詞 pictureBox1.Image = … pictureBox2.Image = … if (pictureBox1.Width < …) pictureBox1.Width += 2; else pictureBox1.Width = … chapter = -chapter; // 播放另一段歌詞
Similar presentations