[Tutorial]Open and Close cd tray

Posts 1–2 of 2 · Page 1 of 1
[Tutorial]Open and Close cd tray
Here is some simple codes to open and close the cd tray
Open
Code:
{ mciSendStringA("set CDAudio door open", rt, 127, 0); }
Close
Code:
{ mciSendStringA("set CDAudio door closed", rt, 127, 0); }
its like a box
nah but sirously gona test it tomorrow. ;D

ojeah i'm getting C tommorow at school (1year earlier then i should get it but care the teacher said that i can do it.(i mean come on i make tutorials for the school. >.> and im in the 2nd semester of the education, and now im gona learn things of the 4th))


*UPDATE*

Can u add these codes too:
Code:
using System.Runtime.InteropServices;
then underneath the form1:form
{
Code:
[DllImport("winmm.dll", EntryPoint = "mciSendStringA")]
public static extern void mciSendStringA(string lpstrCommand,
string lpstrReturnString, long uReturnLength, long hwndCallback);

string rt = "";
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us