|
-
Mar 19th, 2002, 12:43 PM
#1
Thread Starter
New Member
Music
Hey, what's the code to have music repeating in the background? You know, like in games. And I still need help in my "Option Box" question.
-
Mar 19th, 2002, 01:16 PM
#2
Thread Starter
New Member
i may wish to point out
there are multiple people on 1 IP adress using this account. Thats why theres so many questions from me
-
Mar 20th, 2002, 01:06 AM
#3
Member
Hey man this is what I use......... For everything when I want sound or Back Music
'SoundPlayWorks
'Modual
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
' flag values for uFlags parameter
Public Const SND_SYNC = &H0 ' play synchronously (default)
Public Const SND_ASYNC = &H1 ' play asynchronously
Public Const SND_LOOP = &H8 ' loop the sound until next sndPlaySound
Public Const SND_NODEFAULT = &H2 ' silence not default, if sound not found
Public Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
Public Const SRCPAINT = &HEE0086 ' (DWORD) dest = source OR dest
Public Const SRCAND = &H8800C6 ' (DWORD) dest = source AND dest
Public Const SRCINVERT = &H660046 ' (DWORD) dest = source XOR dest
Public Const SRCERASE = &H440328
'Code''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Form_Load()
j = sndPlaySound(App.Path + "\Needle.wav", SND_ASYNC Or SND_LOOP)'Makes the music loop, delete the Or SND_LOOP if you do not want the music to keep on playing
End Sub
'I would also add this code into the form terminate and stuff like that because if you dont and the program quits on accident, it will keep on playing the music... heh
Private Sub Form_Unload(Cancel As Integer)
j = sndPlaySound(vbNullString, SND_ASYNC)
End Sub
'YOU MIGHT HAVE TO ADJUSTS SOME THINGS TO FIT ON ONE LINE
[]:::::::::::[];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;/
Did you know that you can be your own grandpa?! It's really cool. . . . . .
------------------------------------------------
But I'm not. . . Im just Myself. . . . .
Not my own grandpa. . . . . .
I put on my own pants today. . . . .
Im so proud of myself. . . . . 
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
|