⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 Visual.Basic.NET实用编程百例-47.6M.zip
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "打开和关闭CD-ROM"
   ClientHeight    =   1605
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4260
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   1605
   ScaleWidth      =   4260
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command2 
      Caption         =   "关闭"
      Height          =   735
      Left            =   2040
      TabIndex        =   1
      Top             =   360
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "打开"
      Height          =   735
      Left            =   360
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   360
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
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 Command1_Click()
        retvalue = mciSendString("set CDAudio door open", _
                                returnstring, 127, 0)

End Sub
Private Sub Command2_Click()
retvalue = mciSendString("set CDAudio door closed", _
                                returnstring, 127, 0)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -