Results 1 to 11 of 11

Thread: Internal Speaker

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    4
    I am creating a quiz and I wish to make the Internal speaker bleep when a button is pressed. Is there any way that I can do this?
    AKalebic

  2. #2
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    Use the Beep command.

    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  3. #3
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Yeah, the beep command works ok, but if you have a soundcard it will make the beep out of your external speakers.

    Add a module and paste the following into it:

    Public Declare Function MessageBeep Lib "user32" (ByVal wType As Long) As Long

    Now call the beep with the following (from a button or something):

    MessageBeep -1

    The -1 value makes the internal speaker beep, whilst a +1 value (or just 1) makes the beep through a soundcard if you have one.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Is there anyone who know how to beep with different frequencies?

  5. #5
    Guest
    You mean like the QB play function?

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Yeah, or more like the QB sound. Cool thing really

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

    Visit these links:


  8. #8

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    4
    As you may have guessed I am very new at VB programming!
    What is the Beep command and where do I insert it????

  9. #9
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    OH! We didn't tell you that, Insert it in the command button click event

  10. #10

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    4
    Thank U all very much! There is one other thing though....
    Is there any way that I can produce different frequencies? can I have the whole code for this please? Is there also any way that I can string together a kind of melody using the internal speaker to mark the end of the quiz?

  11. #11

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    4
    Thank U all very much! There is one other thing though....
    Is there any way that I can produce different frequencies? can I have the whole code for this please? Is there also any way that I can string together a kind of melody using the internal speaker to mark the end of the quiz?

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