Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Function 音を鳴らす(sound As Integer) 'サウンドファイルが見つからなければエラー音がなるはず Dim Ret As Long If sound = 1 Then Ret = sndPlaySound("C:\Windows\Media\Chimes.wav", 0) If sound = 2 Then Ret = sndPlaySound("C:\Windows\Media\start.wav", 0) If sound = 3 Then Ret = sndPlaySound("C:\Windows\Media\Windows XP Information Bar.wav", 0)