和Msgbox弹出时的声音一样(不要增加额外的控件)

解决方案 »

  1.   

    Private Sub Command1_Click()
    Beep
    End Sub
      

  2.   

    beep 只能发出"叮"的声音
    而我想发出"当"的声音呀
      

  3.   

    1 Beep2 将系统的默认声音改为“当”。
      

  4.   

    比较灵活的方法(不需要改用户的系统设置)是:随应用程序发行一个wav文件,用API函数调用它发声。模块中声明:
    Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long窗体中调用:
    sndPlaySound App.Path & "\Dang.wav", &H20001
      

  5.   

    如果有兴趣 也可以试试MMControl控件
    MMControl.command="stop"
    MMControl.FileName=App.Path & "\Dang.wav"
    MMControl.command="open"
    MMControl.command="play"
      

  6.   

    在普通游戏程序(如撞球)中去找到那个发音“当”的.wav文件,用of123()的方法调用就成。
      

  7.   

    不知道windows里的发这个声音的文件在哪里?