VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
AutoRedraw = -1 'True
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 3750
ClientTop = 3645
ClientWidth = 4665
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4665
Begin MSComDlg.CommonDialog CommonDialog1
Left = 2040
Top = 2400
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton Command4
Caption = "ejectin"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 3
Top = 1440
Width = 1695
End
Begin VB.CommandButton Command3
Caption = "ejectout"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 2
Top = 1440
Width = 1695
End
Begin VB.CommandButton Command2
Caption = "stop"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 1
Top = 360
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "play"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 0
Top = 360
Width = 1695
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim returnstring As String
Dim returns, cdroomout
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 Declare Function mciGetErrorString Lib "winmm.dll" Alias "mciGetErrorStringA" (ByVal dwError As Long, ByVal lpstrBuffer As String, ByVal uLength As Long) As Long
Private Sub Command1_Click()
returns = mciSendString("play" & "D:\vb50\m001.wav", returnstring, 256, 0)
'returns = mciGetErrorString(returns, returnstring, 255)
Debug.Print returnstring
End Sub
Private Sub Command3_Click()
'If cdroomout = 0 Then
' returns = mciExecute("set cdaudio door open")
'mciSendString "open cdaudio alias cd wait shareable", 0, 0, 0
mciSendString "set cd door open", 0, 0, hWnd
' cdroomout = 1
'Else
' returns = mciExecute("close cdaudio")
' cdroomout = 0
'End If
End Sub
Private Sub Command4_Click()
mciSendString "set cd door closed", 0, 0, hWnd
End Sub
Private Sub Form_Load()
'cdroomout = 0
'returns = mciExecute("open")
End Sub