|
-
Apr 24th, 2000, 07:38 PM
#1
Thread Starter
Hyperactive Member
Is it possible to play sounds with the
PC-Speaker (in VB 3.0) ?
Thanks for some adive, Matt 
-
Apr 24th, 2000, 07:44 PM
#2
Frenzied Member
*Laughs*
I remember doing this in BASIC on the BBC when I was, like, 9 or something Hehe. Hmm.. what was the syntax?...
It was 'play' or 'sound' or something. I think it was sound. You called the sound function and gave it a frequency and duration, and you got that tone from the PC (or in my case BBC) speaker. Might not work any more I guess. Still, worth a try eh? Good luck
Harry.
"From one thing, know ten thousand things."
-
Apr 24th, 2000, 07:59 PM
#3
Fanatic Member
I don't think VB supports the Sound method that QBasic did. Though i do remember trying to write songs with only number to play with. The best i think you can get from VB is the simple and boring beep.
Iain, thats with an i by the way!
-
Apr 24th, 2000, 08:19 PM
#4
PowerPoster
As I know there's an API call to play speaker sounds... *looks*
Yeah, found it!
Code:
Public Declare Function Beep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
It seems that you can set frequency and duration.. hope this helps
-
Apr 24th, 2000, 08:43 PM
#5
Frenzied Member
Nice one Fox Just like old times hehe
Harry.
"From one thing, know ten thousand things."
-
Apr 24th, 2000, 10:37 PM
#6
Fanatic Member
It doesn't always work
That beep thing doesn't work on my computer. I think
it only works on Win98+ or something.
Well, I just said that to add to my posts.
See you later alligator
See you in a while crocodile
See you soon baboon
See you in a tick you little pri...
[Director: CUT!]
ck. Bye!
-
Apr 24th, 2000, 11:18 PM
#7
Hyperactive Member
Do a search for it. I know I've answered this question somewhere. Frequency, tone, sound, PC Speaker, other key words like that should do it for you.
bob
-
Apr 24th, 2000, 11:33 PM
#8
Hyperactive Member
Yes, it CAN be done.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|