📄 savedialog.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5580
ClientLeft = 165
ClientTop = 855
ClientWidth = 6720
LinkTopic = "Form1"
ScaleHeight = 5580
ScaleWidth = 6720
StartUpPosition = 3 '窗口缺省
Begin VB.ListBox List1
Height = 3300
Left = 1200
TabIndex = 1
Top = 480
Width = 2775
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 5520
Top = 120
_ExtentX = 847
_ExtentY = 847
_Version = 393216
Filter = "文本文件(*.txt)|*.txt|dat文件(*.dat)|*.dat"
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 255
Left = 1920
TabIndex = 0
Top = 4080
Width = 975
End
Begin VB.Menu 文件
Caption = "File"
Index = 0
Begin VB.Menu 打开
Caption = "open"
Index = 1
End
End
Begin VB.Menu tool
Caption = "工具"
Index = 0
Begin VB.Menu pen1
Caption = "pen"
HelpContextID = 1
Index = 1
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim st As String
Private Sub Command1_Click()
End
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
End Sub
Private Sub pen1_Click(Index As Integer)
Print "11"
End Sub
Private Sub 打开_Click(Index As Integer)
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "*.txt" And CommonDialog1.FileName <> "" Then
Open CommonDialog1.FileName For Input As #1
Do While Not EOF(1)
Line Input #1, st
If st <> "" Then
' List1.AddItem (st + vbCr)
End If
Loop
Close #1
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -