📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "控制光驱"
ClientHeight = 2130
ClientLeft = 45
ClientTop = 330
ClientWidth = 3450
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2130
ScaleWidth = 3450
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command3
Caption = "退出"
Height = 465
Left = 825
TabIndex = 2
Top = 1470
Width = 1710
End
Begin VB.CommandButton Command2
Caption = "关闭光驱"
Height = 465
Left = 825
TabIndex = 1
Top = 825
Width = 1710
End
Begin VB.CommandButton Command1
Caption = "打开光驱"
Height = 465
Left = 825
TabIndex = 0
Top = 195
Width = 1710
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -