📄 曲面_立体图f1.frm
字号:
VERSION 5.00
Begin VB.Form frmFile
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "输入需要显示图形的数据文件"
ClientHeight = 4365
ClientLeft = 4515
ClientTop = 1890
ClientWidth = 5160
LinkTopic = "Form2"
PaletteMode = 1 'UseZOrder
ScaleHeight = 4365
ScaleWidth = 5160
Begin VB.ComboBox Combo1
Appearance = 0 'Flat
Height = 300
Left = 120
TabIndex = 7
Text = "*.DAT"
Top = 3840
Width = 2055
End
Begin VB.CommandButton cmdExit
Caption = "取消"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3840
TabIndex = 4
Top = 3720
Width = 1095
End
Begin VB.CommandButton cmdOK
Caption = "确定"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2640
TabIndex = 3
Top = 3720
Width = 1095
End
Begin VB.DirListBox Dir1
Appearance = 0 'Flat
Height = 3030
Left = 2640
TabIndex = 2
Top = 480
Width = 2295
End
Begin VB.DriveListBox Drive1
Appearance = 0 'Flat
Height = 300
Left = 120
TabIndex = 1
Top = 480
Width = 2055
End
Begin VB.FileListBox File1
Appearance = 0 'Flat
Height = 2190
Left = 120
TabIndex = 0
Top = 1200
Width = 2055
End
Begin VB.Label lblDrive
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "选择驱动器"
ForeColor = &H80000008&
Height = 255
Left = 120
TabIndex = 9
Top = 240
Width = 2055
End
Begin VB.Label lblFileType
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "选择文件类型"
ForeColor = &H80000008&
Height = 255
Left = 120
TabIndex = 8
Top = 3600
Width = 2055
End
Begin VB.Label lblDir
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "选择文件夹"
ForeColor = &H80000008&
Height = 255
Left = 3240
TabIndex = 6
Top = 240
Width = 975
End
Begin VB.Label lblFileName
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "选择文件名"
ForeColor = &H80000008&
Height = 255
Left = 120
TabIndex = 5
Top = 960
Width = 2055
End
End
Attribute VB_Name = "frmFile"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'文件窗体
Option Explicit
Dim strText As String
Private Sub Form_Load()
'使用AddItem方法为组合框增加项目
With Combo1
.AddItem "DAT files(*.DAT)" 'ListIndex = 0
.AddItem "Text files(*.TXT)" 'ListIndex = 1
.AddItem "All files (*.*)" 'ListIndex = 2
.ListIndex = 0 '缺省选中项为DAT
End With
End Sub
'组合框的单击事件
Private Sub Combo1_Click()
'根据索引确定选中项
Select Case Combo1.ListIndex
Case 0
File1.Pattern = "*.dat"
Case 1
File1.Pattern = "*.TXT"
Case 2
File1.Pattern = "*.*"
End Select
End Sub
'确定
Private Sub cmdOK_Click()
Dim Path
If strText = "" Or strText = "*.DAT" Then
MsgBox "您必须选择一个文件!"
Exit Sub
End If
If Right$(File1.Path, 1) <> "\" Then
Path = File1.Path + "\"
Else
Path = File1.Path
End If
If strText = File1.FileName Then
NFIL = Path + File1.FileName
Else
NFIL = strText
End If
modDraw.FDATA1
frmPicture.Show
frmFile.Hide
End Sub
'退出
Private Sub cmdExit_Click()
frmFile.Hide
End Sub
'选择目录
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
'选择驱动器
Private Sub Drive1_Change()
On Error GoTo DriveError
Dir1.Path = Drive1.Drive
Exit Sub
DriveError:
MsgBox "驱动器错误!", 48, "文件名"
Drive1.Drive = Dir1.Path
End Sub
'选择文件
Private Sub File1_Click()
strText = File1.FileName
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -