Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
To play Wav files on forms, just using 2 lines of ...
Author:
Aydin Maxfield
E-mail:
Click to e-mail author
Submitted:
3/7/2001
Version:
VB6
Compatibility:
VB6
Category:
Multimedia
Views:
12210
To play Wav files on forms, just using 2 lines of code. First time I tried this, I needed a module for the declaration, but just two days ago, I didn't. My friend (a1n2g3e4l5@hotmail.com) said he never had to use a module. So, just try both and see what you get. Have Fun.
Declarations:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName as String, ByVal uFlags as Long) as Long 'This is all one line
Code:
Private Sub Command1_Click() sndPlay=sndPlaySound("Filename", 1) End Sub 'Where FileName is your directory of the file
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement