practice10-5.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 108 行
FRM
108 行
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2490
ClientLeft = 60
ClientTop = 345
ClientWidth = 5115
LinkTopic = "Form1"
ScaleHeight = 2490
ScaleWidth = 5115
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "颜色"
Height = 495
Left = 3240
TabIndex = 4
Top = 1560
Width = 975
End
Begin VB.CommandButton Command2
Caption = "字体"
Height = 495
Left = 2160
TabIndex = 3
Top = 1560
Width = 975
End
Begin VB.CommandButton Command1
Caption = "打开"
Height = 495
Left = 1200
TabIndex = 2
Top = 1560
Width = 855
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 480
Top = 1560
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DialogTitle = "请选择文件"
Filter = "文本文件|*.txt|所有文件|*.*"
InitDir = "c:\winnt"
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2040
TabIndex = 1
Top = 360
Width = 2415
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "路径及文件名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 480
TabIndex = 0
Top = 480
Width = 1470
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
CommonDialog1.ShowOpen
Text1.Text = CommonDialog1.FileName
End Sub
Private Sub Command2_Click()
CommonDialog1.Flags = 259
CommonDialog1.ShowFont
Text1.Font = CommonDialog1.FileName
Text1.FontBold = CommonDialog1.FontBold
Text1.FontItalic = CommonDialog1.FontItalic
Text1.FontStrikethru = CommonDialog1.FontStrikethru
Text1.FontUnderline = CommonDialog1.FontUnderline
Text1.ForeColor = CommonDialog1.Color
Text1.FontSize = CommonDialog1.FontSize
End Sub
Private Sub Command3_Click()
CommonDialog1.ShowColor
Text1.BackColor = CommonDialog1.Color
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?