ls_dxje = xx2dx(Amoney)
count = len(ls_dxje)
for i= 1 to count step 2
CHOOSE CASE mid(ls_dxje,i,2)
CASE "零"
playsound("0.wav",0)
CASE "壹"
playsound("1.wav",0)
CASE "贰"
playsound("2.wav",0)
CASE "叁"
playsound("3.wav",0)
CASE "肆"
playsound("4.wav",0)
CASE "伍"
playsound("5.wav",0)
CASE "陆"
playsound("6.wav",0)
CASE "柒"
playsound("7.wav",0)
CASE "捌"
playsound("8.wav",0)
CASE "玖"
playsound("9.wav",0)
CASE "拾"
playsound("十.wav",0)
CASE "佰"
playsound("佰.wav",0)
CASE "仟"
playsound("仟.wav",0)
CASE "万"
playsound("万.wav",0)
CASE "亿"
playsound("亿.wav",0)
CASE "元"
playsound("元.wav",0)
CASE "角"
playsound("角.wav",0)
CASE "分"
playsound("分.wav",0)
CASE "整"
playsound("整.wav",0)
END CHOOSE
next
6、在程序中,可以任意调用此函数。当然,可以适当加入出错处理一类的代码。
7、备注:如果不能发声,应检查声音文件是否在可执行文件的同一路径,最好是在函数MyReadMoney中,对各wav文件直接加上路径如C:\temp
……