先将以上代码全部放在新建模块中 Declare Sub mciSendStringA Lib "winmm.dll" (ByVal lpstrCommand As String, ByVal lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal hwndCallback As Long)然后按ctrl+G打开调试窗口,粘贴以下一行代码,就可打开光驱。 '打开光驱 'mciSendStringA "Set CDAudio Door Open", 0&, 0, 0 '关闭光驱 'mciSendStringA "Set CDAudio Door Closed", 0&, 0, 0 |
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-2-23 22:19 , Processed in 0.084579 second(s), 25 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.