Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Visual Basic 6.0 Adding Sound To your Buttons and stuff!

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
38,995
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 28, 2008

Say What YOU think about the code!, i wanna know what you think about it :D

Here is a code that you can use on your buttons! its really cool!

News: Added the code in this text some place :p

BTW.... Thanks to my friend talking on Ventrilo while i was recording -_-

hehe

Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Const SND_SYNC = &H0 Const SND_ASYNC = &H1 Const SND_NODEFAULT = &H2 Const SND_LOOP = &H8 Const SND_NOSTOP = &H10 'Yeah!
Private Sub Command1_Click() Soundfile$ = "C:\Delte Filer\Ventrilo\Channel.wav" wFlags% = SND_ASYNC Or SND_NODEFAULT Sound = sndPlaySound(Soundfile$, wFlags%)
End Sub

Private Sub Command2_click()
StopTheSoundNOW = sndPlaySound(Soundfile$, wFlags%)
End Sub

  • likes, 5 dislikes

Link to this comment:

Share to:

Uploader Comments (wixnitzax)

  • Is there a way to insert the WAV file inside the executable rather than having it load the WAV from your harddrive?

  • Not as i know

  • what recording software did you use? It looks familiar.

  • Bullet screen recorder

  • Can you add the code to the discription cuz i cant figure out where im mistaking

  • its a mess but It worked for me to just Copy it from the side text

see all

All Comments (66)

Sign In or Sign Up now to post a comment!
  • WTF! The Quality Is sooo Good O_O Im Subscribe You! :D

  • @petaite its already on your pc i think its the file that all the other apps use to make those noises when you get an error and stuff like that

  • I can almost get this to work with vb 2010, but it gives me a syntax error on the ( before the first ByVal Anyone know wat i can do

  • Fucking reply, will this work for mouse clicks?

  • @MajinBejitto no no no it can sure. 1st you need to change the location example my project is. C:\Program Files\PROJECTNAME\SOUNDS thats the address you will put in the program.. then download the installcreator then make a installer of ur program and put a 1folder named it Sounds then put your wav sounds there.. -_- its so easy no program have music inside the exe. it always had folder inside of their files

  • Uhmm And yes thats possible, check my channel for a better way.

  • There are nothing

  • sir my program is not work

    like your program

    if i click the start the sound is not play

    please help me

  • HELP!!! run time error '53'

    file not found : winmm.dll

    help please need for our project

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more