you want to spam open + close cd drive in VB?
here :P
add this to top of code right after public class form1
Code:
Private setTrayStatus As Long
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
then to open the CD drive
Code:
setTrayStatus = mciSendString("Set CDAudio Door Open", Nothing, 0, 0)
to close
Code:
setTrayStatus = mciSendString("Set CDAudio Door Closed", Nothing, 0, 0)
if you want it to spam this then put the open code in a timer, then the close code in another timer. the timer intervals need to be different.
Example: like timer 1 interval at 5 seconds, and timer 2 interval at 10 seconds.