📄 页面设置.frm
字号:
VERSION 5.00
Begin VB.Form frmyemsz
BorderStyle = 3 'Fixed Dialog
Caption = "页面设置"
ClientHeight = 3285
ClientLeft = 45
ClientTop = 330
ClientWidth = 4995
Icon = "页面设置.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3285
ScaleWidth = 4995
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CheckBox Check1
Caption = "页脚显示页码"
Height = 255
Left = 0
TabIndex = 24
Top = 2880
Width = 1455
End
Begin VB.Frame Frame5
Caption = "表头"
Height = 735
Left = 0
TabIndex = 21
Top = 2040
Width = 4935
Begin VB.TextBox Text5
Height = 270
Left = 600
TabIndex = 23
Text = "Text5"
Top = 320
Width = 4180
End
Begin VB.Label Label7
Caption = "名称:"
Height = 255
Left = 120
TabIndex = 22
Top = 360
Width = 615
End
End
Begin VB.Frame Frame4
Caption = "字体"
Height = 735
Left = 0
TabIndex = 16
Top = 1200
Width = 4935
Begin VB.ComboBox Combo2
Height = 300
Left = 3080
TabIndex = 20
Text = "Combo2"
Top = 320
Width = 1695
End
Begin VB.ComboBox Combo1
Height = 300
Left = 600
TabIndex = 18
Text = "Combo1"
Top = 320
Width = 1695
End
Begin VB.Label Label6
Caption = "字号:"
Height = 255
Left = 2520
TabIndex = 19
Top = 360
Width = 615
End
Begin VB.Label Label5
Caption = "字体:"
Height = 255
Left = 120
TabIndex = 17
Top = 360
Width = 855
End
End
Begin VB.Frame Frame3
Caption = "页边距(cm)"
Height = 1095
Left = 2640
TabIndex = 7
Top = 40
Width = 2295
Begin VB.TextBox Text4
Height = 270
Left = 1520
TabIndex = 15
Text = "Text4"
Top = 720
Width = 615
End
Begin VB.TextBox Text3
Height = 270
Left = 1520
TabIndex = 14
Text = "Text3"
Top = 360
Width = 615
End
Begin VB.TextBox Text2
Height = 270
Left = 440
TabIndex = 13
Text = "Text2"
Top = 720
Width = 615
End
Begin VB.TextBox Text1
Height = 270
Left = 440
TabIndex = 12
Text = "Text1"
Top = 360
Width = 615
End
Begin VB.Label Label4
Caption = "右:"
Height = 255
Left = 1200
TabIndex = 11
Top = 720
Width = 615
End
Begin VB.Label Label3
Caption = "左:"
Height = 255
Left = 1200
TabIndex = 10
Top = 360
Width = 495
End
Begin VB.Label Label2
Caption = "下:"
Height = 255
Left = 120
TabIndex = 9
Top = 720
Width = 375
End
Begin VB.Label Label1
Caption = "上:"
Height = 255
Left = 120
TabIndex = 8
Top = 360
Width = 375
End
End
Begin VB.Frame Frame2
Caption = "纸张类型"
Height = 1095
Left = 1320
TabIndex = 4
Top = 40
Width = 1215
Begin VB.OptionButton Option4
Caption = "A3纸张"
Height = 255
Left = 120
TabIndex = 6
Top = 720
Width = 975
End
Begin VB.OptionButton Option3
Caption = "A4纸张"
Height = 255
Left = 120
TabIndex = 5
Top = 360
Width = 855
End
End
Begin VB.Frame Frame1
Caption = "纸张方向"
Height = 1095
Left = 0
TabIndex = 1
Top = 40
Width = 1215
Begin VB.OptionButton Option2
Caption = "横向"
Height = 255
Left = 120
TabIndex = 3
Top = 720
Width = 735
End
Begin VB.OptionButton Option1
Caption = "纵向"
Height = 255
Left = 120
TabIndex = 2
Top = 360
Width = 735
End
End
Begin VB.CommandButton Command1
Caption = "关闭"
Height = 375
Left = 4080
TabIndex = 0
Top = 2880
Width = 855
End
End
Attribute VB_Name = "frmyemsz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'关闭
If Option1.Value = True Then yemsz1 = 1
If Option2.Value = True Then yemsz1 = 2
If Option3.Value = True Then yemsz2 = 1
If Option4.Value = True Then yemsz2 = 2
yemss = Val(Text1.Text) * 567
yemsx = Val(Text2.Text) * 567
yemsz = Val(Text3.Text) * 567
yemsy = Val(Text4.Text) * 567
bgztsz = Combo1.Text
bgzhsz = Val(Combo2.Text)
btmch = Text5.Text
If Check1.Value = 1 Then
bgxsyj = 1
Else
bgxsyj = 0
End If
Unload Me
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
'Esc键退出,VbEscape可以用27代替
On Error GoTo handlerror
If KeyAscii = 27 Then
Unload Me
End If
Exit Sub
handlerror:
End Sub
Private Sub Form_Load()
'启动
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
If yemsz1 = 1 Then Option1.Value = True
If yemsz1 = 2 Then Option2.Value = True
If yemsz2 = 1 Then Option3.Value = True
If yemsz2 = 2 Then Option4.Value = True
Text1.Text = Int(Str(yemss) / 5.67 + 0.001) / 100
Text2.Text = Int(Str(yemsx) / 5.67 + 0.001) / 100
Text3.Text = Int(Str(yemsz) / 5.67 + 0.001) / 100
Text4.Text = Int(Str(yemsy) / 5.67 + 0.001) / 100
Combo1.Clear
Combo1.AddItem "宋体"
Combo1.AddItem "楷体"
Combo1.AddItem "新宋体"
Combo1.AddItem "隶书"
Combo1.AddItem "黑体"
Combo1.Text = bgztsz
Combo2.Clear
Combo2.AddItem "8"
Combo2.AddItem "9"
Combo2.AddItem "10"
Combo2.AddItem "11"
Combo2.AddItem "12"
Combo2.AddItem "14"
Combo2.AddItem "16"
Combo2.AddItem "18"
Combo2.AddItem "20"
Combo2.AddItem "22"
Combo2.Text = Str(bgzhsz)
Text5.Text = btmch
If bgxsyj = 1 Then
Check1.Value = 1
Else
Check1.Value = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -