In our FoxPro for Windows 2.6 application, we are using the ?? CHR(7) to ring the bell when there is data entry error. But, when the application was run on a PC with enhanced sound, we got two sounds, one apparently generated by the MsgBox function used to display the message and one by the ?? CHR(7). So, the developer added code to the application to try and determine whether or not a PC had enhanced sound. If it doesn't, the code executes the ?? CHR(7). But, now on another PC, when an error message is displayed, there is no sound at all. The following code seems to be returning a value that indicates this PC has enhanced sound, so the ?? CHR(7) is not executed. Could someone please tell me if this is the correct way to determine if a PC has enhanced sound?
gnWaveNum = EVALUATE("RegFn('waveOutGetNumDevs', '', 'I', 'MMsystem.dll')")
gnEnhSnd = EVALUATE("CallFn("+STR(gnWaveNum)+")") > 0
So, if gnEnhSnd is .T., the PC supposedly has enhanced sound.
Martha Harris
University of Vermont