Private Declare Function sndPlaySound Lib "winmm.dll" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Sub PlaySound(SoundFile As String)
sndPlaySound SoundFile, 1
End Sub
Option Compare Database
Public Sub PlayPHONESound(StrSound As String)
'============================================================
' 项目名称:
' 过程函数名: PlayPHONESound 类型:Public Sub
'-------------------------------------------------------------
' 版权所有: 懒虫
' 作者: venden (venden@yahoo.com.cn) 2008年1月1日
'-------------------------------------------------------------
' 参数:StrSound As String
' 返回:
'-------------------------------------------------------------
' 说明:播放电话按键音
'-------------------------------------------------------------
' 修订历史:
'=============================================================
Dim Str4Phone As String
Dim Str2Phone As String
' Dim Str9Phone As String
Dim I As Integer
Dim J As Long
Dim ASound As Sound
' MsgBox StrSound
If Trim(StrSound) <> "" Then
Str4Phone = StrSound
For I = 1 To Len(Str4Phone)
Str2Phone = Mid(Str4Phone, I, 1)
' MsgBox Str2Phone
Select Case Str2Phone
Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
' Str9Phone = Str2Phone
Case "#"
' Str9Phone = Str2Phone
Case "*"
Str2Phone = "x"
Case Else
Str2Phone = ""
End Select
' MsgBox Str9Phone
If Str2Phone = "" Then
For J = 1 To 159999999
Next J
Else
Set ASound = New Sound
ASound.PlaySound CurrentProject.Path & "\sound\" & Str2Phone & ".wav"
Set ASound = Nothing
For J = 0 To 9990000
Next J
End If
Next I
End If
End Sub作者: tmtony 时间: 2008-1-19 20:02
不错,有意思, 收藏了作者: andymark 时间: 2008-1-19 20:08
另类程序下来收藏作者: huangxiuwen 时间: 2008-1-19 20:44
顶你。顶你。顶你。顶你。顶你。顶你。顶你。顶你。作者: WDLRCZT 时间: 2008-1-19 22:09
好东东西收藏了~~~作者: tanhong 时间: 2008-1-20 08:55
不错!不错!收藏了.!!作者: goto2008 时间: 2008-1-20 13:36
??????