Results 1 to 8 of 8

Thread: PC-Speaker

  1. #1

    Thread Starter
    Hyperactive Member Matt-D's Avatar
    Join Date
    Nov 1999
    Location
    Mettmann, Germany
    Posts
    305
    Is it possible to play sounds with the
    PC-Speaker (in VB 3.0) ?

    Thanks for some adive, Matt

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Wink *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."

  3. #3
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    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!

  4. #4
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    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

  5. #5
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Nice one Fox Just like old times hehe
    Harry.

    "From one thing, know ten thousand things."

  6. #6
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Wink 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!
    Courgettes.

  7. #7
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305
    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

  8. #8
    Hyperactive Member Juan Carlos Rey's Avatar
    Join Date
    Aug 1999
    Location
    Mendoza, Argentina
    Posts
    301

    Wink 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
  •  



Click Here to Expand Forum to Full Width