📄 form1.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form Form1
Caption = "0"
ClientHeight = 4215
ClientLeft = 60
ClientTop = 345
ClientWidth = 7275
LinkTopic = "Form1"
ScaleHeight = 4215
ScaleWidth = 7275
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "颜色..."
Height = 450
Left = 5145
TabIndex = 3
Top = 0
Width = 1470
End
Begin VB.CommandButton Command2
Caption = "打开..."
Height = 420
Left = 5160
TabIndex = 2
Top = 645
Width = 1500
End
Begin VB.CommandButton Command3
Caption = "保存..."
Height = 525
Left = 5160
TabIndex = 1
Top = 1245
Width = 1485
End
Begin VB.CommandButton Command4
Caption = "打印..."
Height = 495
Left = 5145
TabIndex = 0
Top = 1860
Width = 1500
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 0
Top = 30
_ExtentX = 847
_ExtentY = 847
_Version = 393216
CancelError = -1 'True
Color = 8421631
DialogTitle = "黑体"
FontName = "黑体"
FromPage = 1
Max = 10
Min = 1
ToPage = 2
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
CommonDialog1.Color = &HFF
CommonDialog1.ShowColor
Form1.BackColor = CommonDialog1.Color
End Sub
Private Sub Command2_Click()
' CommonDialog1.FileName = "c:\a.txt"
' CommonDialog1.FileTitle = "a.txt"
Dim str1 As String
CommonDialog1.InitDir = "c:\"
CommonDialog1.Filter = "文本文件 (*.txt)|*.txt"
CommonDialog1.ShowOpen
Open CommonDialog1.filename For Input As 1
Line Input #1, str1
Print str1
Close 1
Caption = CommonDialog1.FileTitle
End Sub
Private Sub Command3_Click()
'CommonDialog1.ShowSave
Dim str1 As String
CommonDialog1.Filter = "文本文件 (*.txt)|*.txt"
CommonDialog1.ShowSave
Open CommonDialog1.filename For Input As 1
Line Input #1, str1
Print str1
Close 1
Caption = CommonDialog1.FileTitle
End Sub
Private Sub Command4_Click()
CommonDialog1.ToPage = 5
CommonDialog1.FromPage = 1
CommonDialog1.Max = 100
CommonDialog1.Min = 1
CommonDialog1.ShowPrinter
Printer.Print "dsfasf"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -