I like to start my project in cd with auto run but if the auto run fails
in any case I like the cd to be ejected (remove cd) in vb6
thank you

Recommended Answers

All 6 Replies

There is One API Function to Open CD Automatically

MCISENDSTRING("SET CD AUDIO DOOR OPENED",0&,0&,0&)

If Previous Command Not Works Try FOr
MCISENDSTRING("SET CDAUDIO DOOR OPENED",0&,0&,0&)

I Appolize to send u the function with wrong arguments earlier
This Is Correct Line of sentence please take this as exact code

This Is Exact Function

retvalue = mciSendString("set CD Audio door open", 0&,0&, 0&)

You will first need to declare that API call in a module or at the top of your form... that declaration will look like this:

Public 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

There is One API Function to Open CD Automatically

MCISENDSTRING("SET CD AUDIO DOOR OPENED",0&,0&,0&)

If Previous Command Not Works Try FOr
MCISENDSTRING("SET CDAUDIO DOOR OPENED",0&,0&,0&)

hi comatose thank you
but dear maheshsayani
i dont know how i can use it .I write it in form load but it does not work
the following statement
retvalue = mciSendString("set CD Audio door open", 0&,0&, 0&)
i am waiting your answer thank you

He made a minor error in his code, it should look more like this (notice the word "open" in place of "opened"): mciSendString "set cdaudio door open", 0&, 0, 0

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.