Determine when mciSendString close when finished

Posts 1–7 of 7 · Page 1 of 1
Determine when mciSendString close when finished
I looked all over good I have my sounds player I want to put in a time if mciSendString is finished then stop I already can make it stop i want it to do it automatically though
With that can I make it stop like if it finishes this code will start mciSendString("close " & sAlias, CStr(0), 0, 0)
Quote Originally Posted by steadyscenerio View Post
With that can I make it stop like if it finishes this code will start mciSendString("close " & sAlias, CStr(0), 0, 0)
Yeah, when you receive the message you can stop the music. If you're doing it in VB.NET, you can handle it like this:
Code:
Private Const MM_MCINOTIFY As Integer = &H3B9
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Protected Overrides Sub WndProc(ByRef m As Message)
	If m.Msg = MM_MCINOTIFY AndAlso m.WParam.ToInt32() = 1 Then
		' Do stuff here.
	End If
	MyBase.WndProc(m)
End Sub
I <3 you for telling me that but I already did it the complicated way but ill put this in my snippits thanks

and another question off topic sorry but I watched this tutorial on how to make a simple sound recorder for the mic
is that possible with your speaker like just capture speakers or soundcard?
Quote Originally Posted by steadyscenerio View Post
I <3 you for telling me that but I already did it the complicated way but ill put this in my snippits thanks

and another question off topic sorry but I watched this tutorial on how to make a simple sound recorder for the mic
is that possible with your speaker like just capture speakers or soundcard?
I'm not entirely sure but to capture speakers, it might require having a "Stereo Mix" recording device if your soundcard supports it. I've never used the MCI library to record anything before so yeah.
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us