源代码如下:using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Media;
using System.Runtime.InteropServices;namespace 监控label属性进行声音循环播放
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent(); 
           
        }
        [DllImport("winmm.dll")]
        public static extern bool PlaySound(string pszSound, int hmod, int fdwSound);//播放windows音乐,重载
        public const int SND_FILENAME = 0x00020000;
        public const int SND_ASYNC = 0x0001;
        public const int SND_LOOP=0x0002;
        public void NoiseOn()
    {
        string strPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
        strPath = strPath + "\\login.wav";
        PlaySound(strPath, 0, SND_LOOP | SND_FILENAME);
    }
        private void button1_Click(object sender, EventArgs e)
        {
            timer1.Interval=5000;
            timer1.Enabled=true;
            timer1.Start();
           
        }        private void timer1_Tick(object sender, EventArgs e)
        {   
            label1.Visible=true;
             if (label1.Visible==true)
            {
                NoiseOn();
            } 
            timer1.Enabled=false;
            timer1.Stop();
        }
    }
  
    }/////////////
问题:声音咋不播放呢?在另外的一台电脑上本人设计了类似的程序,只是播放一声短促的声音后,就完全没有后续的声音了。什么原因啊?请求帮助。panel容器中放置一个label加载一个图片,visible=false.点击button后运行一个timer1,等timer触发时,使用Tick事件,设置label的visible是true。然后运行一个循环播放声音的方法。但是没有声音。