Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining if PC has enhanced sound from FoxPro program
Message
From
25/09/1997 11:00:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Determining if PC has enhanced sound from FoxPro program
Miscellaneous
Thread ID:
00051594
Message ID:
00051594
Views:
77
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
Reply
Map
View

Click here to load this message in the networking platform