Manage Learn to apply best practices and optimize your operations.

Control your CDROM drive with a button

This Code opens and closes the CDROM Driver with a button.

This code opens and closes the CDROM Driver with a button.

1. Create two buttons with the name "open" and "close" 2.Place this script under Declarations=>> 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 3.Place this script under the "click event of the "open" button=>> retvalue = mcisendstring("set CDAudio door open", _ returnstring, 127, 0) 4.Place this under the "click" event of the "close" button retvalue = mcisendstring("set CDAudio door closed", _ returnstring, 127, 0)
This was last published in August 2001

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...