本文介绍了我如何使用VB.NET弹出CD,DVD-ROM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用VB.NET弹出cd,dvd-rom
How I can eject cd, dvd-rom using VB.NET
推荐答案
Private 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
Private Sub cmdOpenCD_Click()
Dim lRet As Long
lRet = mciSendString("set CDAudio door open", returnstring, 127, 0)
End Sub
Private Sub cmdCloseCD_Click()
Dim lRet As Long
lRet = mciSendString("set CDAudio door closed", returnstring, 127, 0)
End Sub
希望对您有所帮助
Hope it helps
这篇关于我如何使用VB.NET弹出CD,DVD-ROM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!