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

📄 frmcreatecd.frm

📁 一个自己把自己想要的东西刻录光盘的程序原代码
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form FrmCreateCD 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "刻录光盘"
   ClientHeight    =   2505
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4680
   Icon            =   "FrmCreateCD.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2505
   ScaleWidth      =   4680
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton CmdRtn 
      Caption         =   "返回(&R)"
      Height          =   375
      Left            =   3600
      TabIndex        =   11
      Top             =   2040
      Width           =   975
   End
   Begin VB.CommandButton CmdOK 
      Caption         =   "开始(&S)"
      Height          =   375
      Left            =   2520
      TabIndex        =   10
      Top             =   2040
      Width           =   975
   End
   Begin VB.Frame Frame1 
      Height          =   60
      Left            =   0
      TabIndex        =   9
      Top             =   1800
      Width           =   4695
   End
   Begin VB.TextBox TxtFileName 
      Enabled         =   0   'False
      Height          =   375
      Index           =   0
      Left            =   1440
      TabIndex        =   6
      Top             =   840
      Width           =   2775
   End
   Begin VB.TextBox TxtFileName 
      Enabled         =   0   'False
      Height          =   375
      Index           =   1
      Left            =   1440
      TabIndex        =   5
      Top             =   1320
      Width           =   2775
   End
   Begin VB.CommandButton CmdSel 
      Caption         =   "..."
      Height          =   375
      Index           =   0
      Left            =   4200
      TabIndex        =   4
      Top             =   840
      Width           =   375
   End
   Begin VB.CommandButton CmdSel 
      Caption         =   "..."
      Height          =   375
      Index           =   1
      Left            =   4200
      TabIndex        =   3
      Top             =   1320
      Width           =   375
   End
   Begin VB.PictureBox Picture1 
      BorderStyle     =   0  'None
      Height          =   615
      Left            =   0
      Picture         =   "FrmCreateCD.frx":0442
      ScaleHeight     =   615
      ScaleWidth      =   4935
      TabIndex        =   2
      Top             =   0
      Width           =   4935
      Begin VB.Timer Timer1 
         Interval        =   50
         Left            =   0
         Top             =   0
      End
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   135
      Left            =   0
      Picture         =   "FrmCreateCD.frx":A7E4
      ScaleHeight     =   135
      ScaleWidth      =   7455
      TabIndex        =   0
      Top             =   600
      Width           =   7455
      Begin VB.PictureBox Picture3 
         BorderStyle     =   0  'None
         Height          =   135
         Left            =   1920
         Picture         =   "FrmCreateCD.frx":C04A
         ScaleHeight     =   135
         ScaleWidth      =   5655
         TabIndex        =   1
         Top             =   0
         Width           =   5655
      End
   End
   Begin MSComDlg.CommonDialog CmnDlg 
      Left            =   0
      Top             =   0
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Label Label2 
      Caption         =   "选择刻盘程序"
      Height          =   255
      Left            =   120
      TabIndex        =   8
      Top             =   1440
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "选择Img文件"
      Height          =   255
      Left            =   120
      TabIndex        =   7
      Top             =   960
      Width           =   1215
   End
End
Attribute VB_Name = "FrmCreateCD"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub CmdOK_Click()
If Dir(TxtFileName(0)) = "" Then
   MsgBox "请先选择要刻录的Img文件", vbExclamation, XTTS
   Exit Sub
End If
If Dir(TxtFileName(1)) = "" Then
   MsgBox "请先选择刻录程序", vbExclamation, XTTS
   Exit Sub
End If
'Shell "c:\smartstor archive\runfsapi.exe writeimage " + TxtFileName(0)
If InStr(1, LCase(TxtFileName(1)), "runfsapi") <> 0 Then
   Shell TxtFileName(1).Text + " writeimage " + TxtFileName(0).Text, vbNormalFocus
Else
   If MsgBox("您选择的刻录程序不是系统支持的应用程序,是否继续", vbQuestion + vbYesNo, XTTS) = vbYes Then
      Shell TxtFileName(1).Text + " " + TxtFileName(0).Text, vbNormalFocus
   End If
End If
RegSetString HKEY_LOCAL_MACHINE, gRegSubKey + "\OPTION", "MakeCDExe", TxtFileName(1)

End Sub

Private Sub CmdRtn_Click()
Unload Me
End Sub

Private Sub CmdSel_Click(Index As Integer)
Dim tStr, tFileFullName As String
On Error GoTo Err

CmnDlg.CancelError = False
If Index = 0 Then
   CmnDlg.Filter = "Img文件 (*.img)|*.img"
   CmnDlg.DialogTitle = "请选择Img文件"
   CmnDlg.FileName = App.Path
Else
   CmnDlg.Filter = "刻盘文件 (*.exe)|*.exe"
   CmnDlg.DialogTitle = "请选择刻盘文件"
   CmnDlg.FileName = TxtFileName(1)
End If
CmnDlg.ShowOpen
TxtFileName(Index) = CmnDlg.FileName
Err:
End Sub

Private Sub Form_Load()
TxtFileName(1).Text = gMakeCDExe
End Sub

Private Sub Timer1_Timer()
   Picture3.Left = Picture3.Left + 50
   If Picture3.Left > Picture2.Left + Picture2.Width Then
      Picture3.Left = Picture2.Left - Picture3.Width
   End If
End Sub

⌨️ 快捷键说明

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