Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
GeneralRe: windows media web control Pin
Heath Stewart19-Apr-04 4:09
protectorHeath Stewart19-Apr-04 4:09 
Generalc# oledbdataadapter using access db and asp Pin
MeterMan18-Apr-04 13:23
MeterMan18-Apr-04 13:23 
GeneralRe: c# oledbdataadapter using access db and asp Pin
Heath Stewart19-Apr-04 4:10
protectorHeath Stewart19-Apr-04 4:10 
GeneralRe: c# oledbdataadapter using access db and asp Pin
MeterMan19-Apr-04 4:28
MeterMan19-Apr-04 4:28 
GeneralRe: c# oledbdataadapter using access db and asp Pin
Heath Stewart19-Apr-04 5:18
protectorHeath Stewart19-Apr-04 5:18 
GeneralRe: c# oledbdataadapter using access db and asp Pin
Heath Stewart19-Apr-04 4:11
protectorHeath Stewart19-Apr-04 4:11 
GeneralPanels and transparency Pin
Flack18-Apr-04 10:01
Flack18-Apr-04 10:01 
GeneralRe: Panels and transparency Pin
Dave Kreskowiak18-Apr-04 12:53
mveDave Kreskowiak18-Apr-04 12:53 
Generaladding new user Pin
emysola18-Apr-04 8:50
emysola18-Apr-04 8:50 
GeneralRe: adding new user Pin
Roman Rodov18-Apr-04 16:02
Roman Rodov18-Apr-04 16:02 
GeneralArray List Pin
Member 95766518-Apr-04 6:16
Member 95766518-Apr-04 6:16 
GeneralRe: Array List Pin
Stefan Troschuetz18-Apr-04 6:51
Stefan Troschuetz18-Apr-04 6:51 
GeneralGet table names in an Access .mdb database Pin
BillAnton18-Apr-04 5:50
BillAnton18-Apr-04 5:50 
GeneralRe: Get table names in an Access .mdb database Pin
Mike Ellison18-Apr-04 19:33
Mike Ellison18-Apr-04 19:33 
GeneralRe: Get table names in an Access .mdb database Pin
Mike Ellison18-Apr-04 19:35
Mike Ellison18-Apr-04 19:35 
GeneralRe: Get table names in an Access .mdb database Pin
BillAnton19-Apr-04 8:37
BillAnton19-Apr-04 8:37 
GeneralReading an ini file Pin
mcgahanfl18-Apr-04 5:27
mcgahanfl18-Apr-04 5:27 
GeneralRe: Reading an ini file Pin
CWIZO18-Apr-04 7:01
CWIZO18-Apr-04 7:01 
GeneralRe: Reading an ini file Pin
kratchkov18-Apr-04 10:02
kratchkov18-Apr-04 10:02 
GeneralRe: Reading an ini file Pin
mcgahanfl18-Apr-04 11:24
mcgahanfl18-Apr-04 11:24 
Generala narrow, veritical dialog Pin
mcgahanfl18-Apr-04 5:23
mcgahanfl18-Apr-04 5:23 
GeneralRe: a narrow, veritical dialog Pin
Jon G19-Apr-04 1:06
Jon G19-Apr-04 1:06 
Generalcdrom tray control Pin
kratchkov18-Apr-04 3:55
kratchkov18-Apr-04 3:55 
GeneralRe: cdrom tray control Pin
Stefan Troschuetz18-Apr-04 6:00
Stefan Troschuetz18-Apr-04 6:00 
GeneralRe: cdrom tray control Pin
MeterMan18-Apr-04 16:22
MeterMan18-Apr-04 16:22 
Try this:
using System.Runtime.InteropServices; // allows you use DllImport


//**************************************************************/
//now inside your class for instance Form1 put the following
//***************************************************************/

[DllImport("winmm.dll", EntryPoint="mciSendString")] 
public static extern int mciSendStringA(string lpstrCommand, string lpstrReturnString, long uReturnLength, long hwndCallback);

//now to open the cdrom drive you have to pass it a message as follows

mciSendStringA("Set CDAudio Door Open Wait", null, 0, 0);
//put this is a button event or something so when you push it it opens drive

to close it I believe its "Set CDAudio Door Close Wait", null, 0, 0);
I can't test it on my system because mine doesn't have autoclose i have to manually close it.



Win32newb
"Making windows programs worse than they already are"

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.