6.23.frm
来自「vb编程+从基础到实践光盘代码」· FRM 代码 · 共 59 行
FRM
59 行
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 495
Left = 840
TabIndex = 1
Top = 600
Width = 3135
End
Begin VB.CommandButton Command1
Caption = "字体"
Height = 495
Left = 1920
TabIndex = 0
Top = 2040
Width = 1215
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 480
Top = 1440
_ExtentX = 847
_ExtentY = 847
_Version = 393216
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.CancelError = True ' 设置“取消”为 True
On Error GoTo ErrHandler
CommonDialog1.Flags = cdlCFEffects Or cdlCFBoth ' 设置 Flags 属性
CommonDialog1.ShowFont ' 显示“字体”对话框
Text1.Font.Name = CommonDialog1.FontName
Text1.Font.Size = CommonDialog1.FontSize
Text1.Font.Bold = CommonDialog1.FontBold
Text1.Font.Italic = CommonDialog1.FontItalic
Text1.Font.Underline = CommonDialog1.FontUnderline
Text1.FontStrikethru = CommonDialog1.FontStrikethru
Text1.ForeColor = CommonDialog1.Color
Exit Sub
ErrHandler: ' 用户按了“取消”按钮
Exit Sub
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?