【发布时间】:2017-01-12 14:54:55
【问题描述】:
主窗体是form1,我在form1中有一个button1 单击按钮时,将显示 form2 我使用 axWindowsMediaPlayer1 播放背景音乐,单击 button1 后,音乐将停止并显示 form2。
private void button1_Click(object sender, EventArgs e)
{
axWindowsMediaPlayer1.Ctlcontrols.stop();
Form2 newForm2 = new Form2();
newForm2.Show();
}
form2中还有一个按钮,点击form2会关闭。 现在我无法弄清楚如何在单击 form2 中的按钮后重放音乐。
【问题讨论】:
-
你应该为你的表单和控件命名。
-
问题不清楚,分享更多代码