期权explicitprivate宣布cddoor库函数
代码说明:
Option Explicit Private Declare Function CDdoor Lib "winmm.dll" Alias "mciSendStringA" _ (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _ ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long Dim state1 As Boolean Private Sub Command1_Click() 打开光驱 state1 = True Call CDdoor("set CDAudio door open", 0, 0, 0) End Sub Private Sub Command2_Click() 关闭光驱 state1 = False Call CDdoor("set CDAudio door closed", 0, 0, 0) End Sub Private Sub Command3_Click() End End Sub-Option ExplicitPrivate Declare Function CDdoor Lib
下载说明:请别用迅雷下载,失败请重下,重下不扣分!