让PC Speaker 还是 声卡?

解决方案 »

  1.   

    对不起,错了。是MessageBeep:
      
      Platform SDK: Debugging and Error Handling 
    MessageBeep
    The MessageBeep function plays a waveform sound. The waveform sound for each sound type is identified by an entry in the registry. BOOL MessageBeep(
      UINT uType   // sound type
    );
    Parameters
    uType 
    [in] Specifies the sound type, as identified by an entry in the registry. This parameter can be one of the following values. Value Sound 
    -1 Standard beep using the computer speaker 
    MB_ICONASTERISK SystemAsterisk 
    MB_ICONEXCLAMATION SystemExclamation 
    MB_ICONHAND SystemHand 
    MB_ICONQUESTION SystemQuestion 
    MB_OK SystemDefault 
    Return Values
    If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError. Res
    After queuing the sound, the MessageBeep function returns control to the calling function and plays the sound asynchronously. If it cannot play the specified alert sound, MessageBeep attempts to play the system default sound. If it cannot play the system default sound, the function produces a standard beep sound through the computer speaker. The user can disable the warning beep by using the Sound control panel application. Requirements 
      Windows NT/2000: Requires Windows NT 3.1 or later.
      Windows 95/98: Requires Windows 95 or later.
      Header: Declared in Winuser.h; include Windows.h.
      Library: Use User32.lib.See Also
    Error Handling Overview, Error Handling Functions, FlashWindow, MessageBox Built on Thursday, May 11, 2000Requirements 
      Windows NT/2000: Requires Windows NT 3.1 or later.
      Windows 95/98: Requires Windows 95 or later.
      Header: Declared in Winuser.h; include Windows.h.
      Library: Use User32.lib.
    See Also
    Error Handling Overview, Error Handling Functions, FlashWindow, MessageBox 
      

  2.   

    beep只能发出"当"的一声,并且快速连续按下Command1时不能及时作出反应.
      

  3.   


     for i=1 to 100
      beep
     next i
    或考虑用Timer定时控件来处理发声的时间及其连续性.要不你说清楚点我来看看该如何写
      

  4.   

    在Command1_Click()中让电脑发出"的嘟"声,每按一次发出一次"的嘟"声.
      

  5.   

    让pc喇叭出“滴”的一声用什么方法faint,我一直以为beep就是
      

  6.   

    Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
    Private Sub Command1_Click()
    sndPlaySound PH & "", &H1
    End Sub
    这段代码绝对可以,没用WAV文件!