Sounds and .WAV using MMControl 6.0
-
In Visual Basic 6 in Highschool we used MMControl 6.0 in order to play .WAV files in our applications? That Was a long time ago. Can anyone please tell me where I can find some code in order to play sounds in my Application Thank You The Jazz Master 6000 DJ Badknees Parma Grind Crew - www.geocities.com/parmagrindcrew
-
In Visual Basic 6 in Highschool we used MMControl 6.0 in order to play .WAV files in our applications? That Was a long time ago. Can anyone please tell me where I can find some code in order to play sounds in my Application Thank You The Jazz Master 6000 DJ Badknees Parma Grind Crew - www.geocities.com/parmagrindcrew
in vb.net do this : VB:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Integer) As Integer
Const SND_SYNC As Integer = &H0
Const SND_ASYNC As Integer = &H1
Const SND_NODEFAULT As Integer = &H2
Const SND_LOOP As Integer = &H8
Const SND_NOSTOP As Integer = &H10
Dim SoundName As String, wFlags As Integer, x As StringPrivate Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
SoundName = "D:\Knock.wav"
wFlags = SND_ASYNC Or SND_NODEFAULT
x = sndPlaySound(SoundName, wFlags)End Sub
putting your sound file's name where it says "D:\Knock.wav" hope that helps:)
Private void ExpectingTwins(string twins)
{
switch(twins)
{
Case ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
break;
}
}
-
in vb.net do this : VB:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Integer) As Integer
Const SND_SYNC As Integer = &H0
Const SND_ASYNC As Integer = &H1
Const SND_NODEFAULT As Integer = &H2
Const SND_LOOP As Integer = &H8
Const SND_NOSTOP As Integer = &H10
Dim SoundName As String, wFlags As Integer, x As StringPrivate Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
SoundName = "D:\Knock.wav"
wFlags = SND_ASYNC Or SND_NODEFAULT
x = sndPlaySound(SoundName, wFlags)End Sub
putting your sound file's name where it says "D:\Knock.wav" hope that helps:)
Private void ExpectingTwins(string twins)
{
switch(twins)
{
Case ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
break;
}
}
Thanks Again...You are a life saver! The Jazz Master 6000 DJ Badknees Parma Grind Crew - www.geocities.com/parmagrindcrew