📄 frmcreate.frm
字号:
VERSION 5.00
Begin VB.Form frmCreate
Caption = "创建可执行文件"
ClientHeight = 4545
ClientLeft = 60
ClientTop = 450
ClientWidth = 5385
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4545
ScaleWidth = 5385
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox txtProc
Height = 3015
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Text = "frmCreate.frx":0000
Top = 480
Width = 5175
End
Begin VB.CommandButton cmdCancel
Caption = "取 消"
Height = 375
Left = 4320
TabIndex = 4
Top = 3960
Width = 975
End
Begin VB.CommandButton cmdOk
Caption = "确 定"
Height = 375
Left = 4320
TabIndex = 3
Top = 3480
Width = 975
End
Begin VB.TextBox txtName
Height = 375
Left = 1560
TabIndex = 2
Top = 3720
Width = 2415
End
Begin VB.Label Label3
Caption = "注:请不要输入扩展名!"
Height = 375
Left = 1920
TabIndex = 6
Top = 4200
Width = 2055
End
Begin VB.Label Label2
Caption = "注:指令与指令之间用(:)隔开!"
Height = 255
Left = 120
TabIndex = 5
Top = 120
Width = 3855
End
Begin VB.Label Label1
Caption = "请输入文件名:"
Height = 255
Left = 120
TabIndex = 1
Top = 3840
Width = 1335
End
End
Attribute VB_Name = "frmCreate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdCancel_Click()
txtName = "" '取消创建或修改
Module.strFile = ""
Module.bolEdit = False
Unload Me
End Sub
Private Sub cmdOk_Click()
If Len(txtProc.Text) > 255 Then
MsgBox "文件长度过长,文件系统支持最大长度为255字节。", vbCritical, "错误"
Exit Sub
End If
Module.bolEdit = True '确定文件创建或修改
Module.strFile = txtProc.Text & Chr(1)
If Len(Trim(txtName.Text)) > 3 Then
MsgBox "文件名过长!", vbCritical, "错误"
Exit Sub
End If
Module.strName = Trim(txtName.Text)
Unload Me
End Sub
Private Sub Form_Load()
txtProc.Text = ""
cmdOk.Enabled = False
End Sub
Private Sub txtName_Change()
If txtName.Text <> "" And txtProc.Text <> "" Then
cmdOk.Enabled = True
Else
cmdOk.Enabled = False
End If
End Sub
Private Sub txtProc_Change()
If txtProc.Text <> "" And txtName.Text <> "" Then
cmdOk.Enabled = True
Else
cmdOk.Enabled = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -