Results 1 to 6 of 6

Thread: VB6 button sound

  1. #1
    Raw Wave lostreception's Avatar
    Join Date
    Sep 2004
    Location
    NY
    Posts
    1,806

    VB6 button sound

    im sorryt his is such a dumb question but i think my code is in check and it just wont work

    my mousedown has this code
    Code:
    Dim sSoundName As String
    sSoundName = App.Path & "\click.wav"
    PlaySound sSoundName, CLng(0), 1
    and my module has this code

    Code:
    Public Declare Function PlaySound Lib "winmm.dll" _
      Alias "PlaySoundA" (ByVal lpszName As String, _
      ByVal hModule As Long, ByVal dwFlags As Long) As Long

    now if i place a MsgBox inbetween these two lines of code i hear the click if i remove it it goes away

    Code:
    Dim sSoundName As String
    MsgBox ""
    sSoundName = App.Path & "\click.wav"
    PlaySound sSoundName, CLng(0), 1
    thanks alot
    .______
    | '_ |__\___
    [(o)|___(o)] XB
    ._________
    | I__I I_I|_\__I
    [(o)______(o)]b VanPimpin'

    LostReceptions Apps D/L Here

    GPSGasoline- Rewriting

    Draw- SkribblePad for Touchscreens

    iGQwerty-iG3.0 Qwerty Keyboard

    CarPCNetwork

  2. #2
    Raw Wave
    Join Date
    Jun 2004
    Location
    On the beach
    Posts
    2,223
    Put a small loop in place where the msgbox is using the sleep command, search in google for the sleep declaration, may help.

  3. #3
    Raw Wave lostreception's Avatar
    Join Date
    Sep 2004
    Location
    NY
    Posts
    1,806
    nope no go still has the same behavior
    .______
    | '_ |__\___
    [(o)|___(o)] XB
    ._________
    | I__I I_I|_\__I
    [(o)______(o)]b VanPimpin'

    LostReceptions Apps D/L Here

    GPSGasoline- Rewriting

    Draw- SkribblePad for Touchscreens

    iGQwerty-iG3.0 Qwerty Keyboard

    CarPCNetwork

  4. #4
    FLAC SFiorito's Avatar
    Join Date
    May 2004
    Posts
    1,365
    right now you're playing the sound asynchronously...change the '1' to '0' to play it synchronously

  5. #5
    Raw Wave lostreception's Avatar
    Join Date
    Sep 2004
    Location
    NY
    Posts
    1,806
    Quote Originally Posted by SFiorito
    right now you're playing the sound asynchronously...change the '1' to '0' to play it synchronously
    that fixed it thanks alot
    .______
    | '_ |__\___
    [(o)|___(o)] XB
    ._________
    | I__I I_I|_\__I
    [(o)______(o)]b VanPimpin'

    LostReceptions Apps D/L Here

    GPSGasoline- Rewriting

    Draw- SkribblePad for Touchscreens

    iGQwerty-iG3.0 Qwerty Keyboard

    CarPCNetwork

  6. #6
    FLAC SFiorito's Avatar
    Join Date
    May 2004
    Posts
    1,365
    no problem, you'll be getting the bill in a few days....$50/hour.





Similar Threads

  1. Sound Car radio and Carpc playing at the same time
    By vea_victis in forum Car Audio
    Replies: 1
    Last Post: 04-03-2005, 11:58 AM
  2. Replies: 6
    Last Post: 03-02-2005, 08:47 AM
  3. button repeating bug?
    By scott_fx in forum Centrafuse
    Replies: 3
    Last Post: 02-23-2005, 11:35 PM
  4. Sound cards from incarpcs , sacrificing sound quality?
    By skinhead in forum General Hardware Discussion
    Replies: 15
    Last Post: 09-02-2004, 02:05 AM
  5. EQ sound question + volume
    By dank_Army in forum General Hardware Discussion
    Replies: 6
    Last Post: 02-16-2004, 12:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •