就是進入程式后,點擊picture后,picture圖片變化同時執行播放,編譯能通過但是功能無法實作,是我思路問題嗎的剛學習C#,想擴展下結果遇到問題,代碼如下
uj5u.com熱心網友回復:
bool b = false; private void pictureBox1_Click(object sender, EventArgs e) { if (b == false) { b = true; this.pictureBox1.Image = Image.FromFile(@" H:\\Kugou\\1.png"); Thread th = new Thread(Mplay); th.IsBackground = true; th.Start(); } else { this.pictureBox1.Image = Image.FromFile(@" H:\\Kugou\\3.png"); m.Ctlcontrols.pause(); } } private void Form1_Load(object sender, EventArgs e) { pictureBox1.Image = this.pictureBox1.Image = Image.FromFile(@" H:\\Kugou\\1.png"); Control.CheckForIllegalCrossThreadCalls = false;轉載請註明出處,本文鏈接:https://www.uj5u.com/net/104743.html
標籤:C#
上一篇:OPC UA官方檔案翻譯
