[C#] Play Song or Movie without Media Player
PHP Code:
[DllImport("winmm.dll")]
private static extern long mciSendString(string strCommand, StringBuilder strReturn, int iReturnLength,
IntPtr hwndCallback);
Would go up top some where. Need using System.Runtime.InteropServices;
PHP Code:
mciSendString("open \"" + File_To_Play + "\" type mpegvideo alias MediaFile", null, 0, IntPtr.Zero);
mciSendString("play MediaFile", null, 0, IntPtr.Zero);
Goes in the play button and what not.
PHP Code:
mciSendString("close MediaFile", null, 0, IntPtr.Zero);
Stop playing.