1 Attachment(s)
PC Speaker won't work under Win2k/XP
I've had this app for a few years now and under Win9x/ME it always works great. It plays tones through the PC Speaker at various frequencies and durations. Running under WinXP it crashes and wants to send an error report to M$. Under Win2k it crashes and gives a message "Windows is closing this program you need to run it again".
I can't remember where I had this app from so I can't contact the supplier. I've check the code and is appears to be functioning correctly the API calls are correct. I wonder it any one has used this app or if they can see where the error occurs. I don't have VB6 running under WinXP anymore, they won't install it at work. So I'm open to any useful suggestions.
Thank you all. ;)
P.S. I would suggest in Win2k/XP compiling the exe first just to save it crashing VB. :)
Re: PC Speaker won't work under Win2k/XP
does this application have something like system requirement. some softwares are built for lower versions of OS and wont run in higher verwions. just like msword document made with word35. it cant be opened with word2k. something like that might have happened to this app of yourse
Re: PC Speaker won't work under Win2k/XP
Quote:
Originally Posted by d3gerald
does this application have something like system requirement.
I don't know, I downloaded it years ago. The API calls should still work on any 32bit system I would have thought.
Re: PC Speaker won't work under Win2k/XP
it bombs out when it tries to turn on the Speaker using CallWindowProc. It uses a hex code to create a MachineCode array and then passes a pointer to the first byte of that array to the function. So perhaps the code to turn on the speaker is different in W2k & XP?
Re: PC Speaker won't work under Win2k/XP
yeah i also experienced that one. i think its a compatibility issue then
Re: PC Speaker won't work under Win2k/XP
Ok then, does anyone know how to convert it for Win2k/XP? ;)
Re: PC Speaker won't work under Win2k/XP
Another way to play sounds from the PC speaker :)
VB Code:
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Dim Freq As Long
Dim Dur As Long
Private Sub Command1_Click()
Freq = 1000
Dur = 100
Beep Freq, Dur 'Play the sound
End Sub
Re: PC Speaker won't work under Win2k/XP
The Beep API doesn't work for me, never as done. I fact the Beep API should be renamed BeepEx or something because it interferes with the default Beep.
I've found the link to the original PC Speaker.
http://www.planet-source-code.com/vb...80&lngWId=1%20
People say it won't work with Win2k/XP. As I said I downloaded a few years ago.
Re: PC Speaker won't work under Win2k/XP
Hi,
Have you tried running it in compatibility mode? Right-click the .exe, Properties-->Compatibility...
domls
Re: PC Speaker won't work under Win2k/XP
Quote:
Originally Posted by domls
Have you tried running it in compatibility mode? Right-click the .exe, Properties-->Compatibility...
I don't have WinXP at home, Win98. Well I do have WinXP but I don't like it. ;)
Re: PC Speaker won't work under Win2k/XP
Quote:
Originally Posted by domls
Have you tried running it in compatibility mode? Right-click the .exe, Properties-->Compatibility...
Didn't crash, but didn't make any sounds either.