Results 1 to 2 of 2

Thread: [RESOLVED] ejecting the cd rom

  1. #1

    Thread Starter
    Hyperactive Member drattansingh's Avatar
    Join Date
    Sep 2005
    Posts
    395

    Resolved [RESOLVED] ejecting the cd rom

    Does anyone knows hwo to simply open the cd rom tray?

    Jennifer

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142

    Re: ejecting the cd rom

    to open & close cd door ...
    VB Code:
    1. [System.Runtime.InteropServices.DllImport("winmm.dll", EntryPoint="mciSendStringA")]
    2.         private static extern int mciSendString (string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback);
    3.  
    4.         private void btnOpen_Click(object sender, System.EventArgs e)
    5.         {
    6.             mciSendString("Set CDAudio Door Open Wait" , null , 0 , 0);
    7.         }
    8.  
    9.         private void btnClose_Click(object sender, System.EventArgs e)
    10.         {
    11.             mciSendString("Set CDAudio Door Closed Wait" , null , 0 , 0);
    12.         }
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width