Open & Close CD Tray

Reputation
0
Hi

Today im going to teach you how to open your pc CD or DvD tray by pressing 1 button and second button to close.

Open a new project and go to tools and drag 2 buttons.

1 button - call it " Open "
2 button - call it " Close "

Now put this code:
[vb]Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long[/vb]

Then double click on the button " Open " and put this code:
[vb]mciSendString("Set CDAudio Door Open Wait", 0&, 0&, 0&)[/vb]

Then double click on the button " Close " and put this code:
[vb] mciSendString("Set CDAudio Door Closed Wait", 0&, 0&, 0&)[/vb]

If you got any problem with the source that i have gave here please contact me via pm and i will reply as soon as possible.

Thank you
 
nice but can you use this to open other ppls cd/dvd trays? and if so can you post the script needed to make it thanks
 
To start executing commands remotely, you'd basically have to start coding your own remote administration tool. And if you code one of them, you'd want to have so many different features other than the ability to open and close a cd tray.
 
yeah bruv you are write just like porat really good rt but detected but who has a good crypter that cleans that, then its all kool
 
ok yer but as well if you have a rat and your looking through files all you have to do is right click the cd drive icon and then click eject but it is proly more time eficiant to have a buton that does it >.<
 
Back
Top