📄 wen2.frm
字号:
VERSION 5.00
Begin VB.Form Form2
Caption = "新建文件夹"
ClientHeight = 1284
ClientLeft = 48
ClientTop = 276
ClientWidth = 3744
LinkTopic = "Form3"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 1284
ScaleWidth = 3744
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command2
Caption = "取消"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 2520
TabIndex = 3
Top = 840
Width = 972
End
Begin VB.CommandButton Command1
Caption = "确定"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 1440
TabIndex = 2
Top = 840
Width = 972
End
Begin VB.TextBox Text1
Height = 264
Left = 120
TabIndex = 1
Top = 480
Width = 3492
End
Begin VB.Label Label1
Caption = "输入新建文件夹的名称"
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 120
TabIndex = 0
Top = 120
Width = 2292
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim msg$
On Error GoTo errBad
ChDir Form1.Dir1.Path '设置到当前路径
MkDir Text1.Text
Form1.Dir1.Refresh '更新目录列表
Unload Form2 '卸载窗体
Exit Sub
errBad:
If (err = 75) Then
MsgBox "路径已经存在或设备未准备好或不存在", vbOKOnly
Else
If (err = 76) Then
MsgBox "路径名错误", vbOKOnly
Else
msg$ = "发现未知错误,错误号=" + Str$(err)
MsgBox msg$, vbOKOnly
End If
End If
End Sub
Private Sub Command2_Click()
Unload Form2
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -