Hi everybody,
I have Foxpro 2.6a for Windows on Windows 2000 Professional. Executing the command "?? CHR(7)" does not produce any sound. Is there a solution to this ?
Thanks Scott. I know this works, but only if a sound card and multi-media speakers are present. Mine has them, but most computers in India don't, especially in offices. I want the sound to come from the PC speaker which is present in most computers. I have developed a standard Inventory package for which I want that. It used to work fine on Windows 3.11 and Windows 98. The problem occurs in Windows 2000.
PARAMETER M.ALERTCOUNT
*
PRIVATE M.ALERTCOUNT
*
IF PARAMETERS() < 1
M.ALERTCOUNT = 1
ENDIF
*
FOR M.SOUNDCOUNT = 1 TO M.ALERTCOUNT
SET BELL TO 1650-(18*M.SOUNDCOUNT), 3
?? CHR(7)
SET BELL TO 650-(5*M.SOUNDCOUNT),3
?? CHR(7)
ENDFOR (M.SOUNDCOUNT)
*
SET BELL TO
*
RELEASE M.ALERTCOUNT
RELEASE M.SOUNDCOUNT
This sends 3 tones to the PC speaker. Due to "Speed" and "Timing" issues, single tones are sometimes missed by faster processor's or some OS's.
It's not clear whether you are checking this out on a machine without a sound card. Many times the presents of one will "disconnect" the PC speaker. Also, not all OEM's supply a Windows Speaker Driver, and I don't believe MS officially supports one anymore. Since NT / 2000 / XP don't allow direct access to the hardware, you may not be able to use any "DOS" like solutions.
Rick,
I'm actually running a FP2.6 app on WinXP Pro, and my calls to the "ALTERONE" procedure I have above still work...
I also have a SoundBlaster LIVE! and a Delta66 ProAudio board in the same machine, with the PC speaker.
That said, I would agree very much with your statement that some audio cards do, however, override your pc speaker.
As far as I am aware (though, I could be wrong), the PC Speaker doesn't require a seperate "Driver" to function in Windows, as it is a call to a specific address, not a call to an IRQ.
Utpal,
Some computers do not come with a PC speaker
anymore.I think It's absurb but I have 7
Gateway Profile III's that do not have them,
or the software to drive them. therefore will
not respond at all to any chr(7) command.
Hope this helps
Charlie Huff
CJ's Homecenter
From the Star Trek Generation
Thanks to all ! I do have a PC speaker. I am sure about that because in FoxPro for DOS 2.6, it produces sound with the same ?? Chr(7) command. Maybe I'll have to look for a PC speaker driver for Windows 2000.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.