Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Media Objects on Forms

Status
Not open for further replies.

Jamie2002

Technical User
Sep 17, 2001
62
0
0
GB
How do I make a .wav file activate on the press of a button, also how can I make a media clip run automatically while a form is open ?

Thanks.
 
I don't know about video, but use this to play a .WAV:


Declare Function sndPlaySound Lib "WINMM.DLL" Alias "sndPlaySoundA" (ByVal lpszSoundName As Any, ByVal uFlags As Long) As Long
Const SND_ASYNC = &H1
Const SND_NOSTOP = &H10

Private Sub cmdButton_Click()
Dim MakeSound As Long

MakeSound = sndPlaySound("C:\Explode.WAV", SND_ASYNC Or SND_NOSTOP)

End Sub

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top