📄 setprint.frm
字号:
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form SetPrn
BorderStyle = 3 'Fixed Dialog
Caption = "报表打印设置"
ClientHeight = 3840
ClientLeft = 45
ClientTop = 330
ClientWidth = 6165
Icon = "SetPrint.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3840
ScaleWidth = 6165
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSComDlg.CommonDialog Dlg1
Left = 1560
Top = 3240
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取 消"
Height = 375
Left = 4680
TabIndex = 2
Top = 3360
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确 认"
Default = -1 'True
Height = 375
Left = 3240
TabIndex = 1
Top = 3360
Width = 1215
End
Begin TabDlg.SSTab SSTab1
Height = 2895
Left = 120
TabIndex = 0
Top = 0
Width = 5895
_ExtentX = 10398
_ExtentY = 5106
_Version = 393216
Style = 1
Tab = 2
TabsPerRow = 4
TabHeight = 520
TabCaption(0) = "标题"
TabPicture(0) = "SetPrint.frx":000C
Tab(0).ControlEnabled= 0 'False
Tab(0).Control(0)= "Command3"
Tab(0).Control(1)= "txt_Title"
Tab(0).Control(2)= "lbl_Title"
Tab(0).Control(3)= "Label1"
Tab(0).ControlCount= 4
TabCaption(1) = "表格"
TabPicture(1) = "SetPrint.frx":0028
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "Option1(2)"
Tab(1).Control(1)= "Option1(1)"
Tab(1).Control(2)= "Option1(0)"
Tab(1).Control(3)= "Command5"
Tab(1).Control(4)= "Command4"
Tab(1).Control(5)= "Label2"
Tab(1).Control(6)= "lbl_Body"
Tab(1).Control(7)= "lbl_Head"
Tab(1).ControlCount= 8
TabCaption(2) = "汇总"
TabPicture(2) = "SetPrint.frx":0044
Tab(2).ControlEnabled= -1 'True
Tab(2).Control(0)= "Label3"
Tab(2).Control(0).Enabled= 0 'False
Tab(2).Control(1)= "chk_PrnDate"
Tab(2).Control(1).Enabled= 0 'False
Tab(2).Control(2)= "chk_Sum"
Tab(2).Control(2).Enabled= 0 'False
Tab(2).Control(3)= "chk_UnderLine"
Tab(2).Control(3).Enabled= 0 'False
Tab(2).Control(4)= "chk_Center"
Tab(2).Control(4).Enabled= 0 'False
Tab(2).Control(5)= "chk_Bold"
Tab(2).Control(5).Enabled= 0 'False
Tab(2).Control(6)= "txt_Foot"
Tab(2).Control(6).Enabled= 0 'False
Tab(2).ControlCount= 7
Begin VB.TextBox txt_Foot
Height = 375
Left = 4560
TabIndex = 20
Text = "Text1"
Top = 2160
Width = 855
End
Begin VB.CheckBox chk_Bold
Caption = "合计栏加重"
Height = 375
Left = 3480
TabIndex = 19
Top = 1560
Width = 1935
End
Begin VB.CheckBox chk_Center
Caption = "合计栏居中"
Height = 375
Left = 480
TabIndex = 18
Top = 2040
Width = 1935
End
Begin VB.CheckBox chk_UnderLine
Caption = "合计栏加下划线"
Height = 375
Left = 480
TabIndex = 17
Top = 1560
Width = 1935
End
Begin VB.CheckBox chk_Sum
Caption = "打印表格总汇总"
Height = 375
Left = 480
TabIndex = 16
Top = 1080
Width = 1695
End
Begin VB.CheckBox chk_PrnDate
Caption = "打印当前日期"
Height = 375
Left = 480
TabIndex = 15
Top = 600
Width = 1695
End
Begin VB.OptionButton Option1
Caption = "居右"
Height = 255
Index = 2
Left = -70920
TabIndex = 14
Top = 600
Width = 975
End
Begin VB.OptionButton Option1
Caption = "居中"
Height = 255
Index = 1
Left = -71880
TabIndex = 13
Top = 600
Width = 975
End
Begin VB.OptionButton Option1
Caption = "居左"
Height = 255
Index = 0
Left = -72840
TabIndex = 12
Top = 600
Width = 975
End
Begin VB.CommandButton Command5
Caption = "字体设置"
Height = 375
Left = -71400
TabIndex = 10
Top = 1080
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "字体设置"
Height = 375
Left = -74520
TabIndex = 9
Top = 1080
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "字体设置"
Height = 375
Left = -70680
TabIndex = 5
Top = 1440
Width = 1215
End
Begin VB.TextBox txt_Title
Height = 375
Left = -73680
TabIndex = 3
Text = "Text1"
Top = 960
Width = 4215
End
Begin VB.Label Label3
Caption = "页面调整:"
Height = 255
Left = 3480
TabIndex = 21
Top = 2160
Width = 1095
End
Begin VB.Label Label2
Caption = "表格打印位置: "
Height = 375
Left = -74520
TabIndex = 11
Top = 600
Width = 1455
End
Begin VB.Label lbl_Body
Caption = "表格内容"
Height = 375
Left = -70920
TabIndex = 8
Top = 1680
Width = 1095
End
Begin VB.Label lbl_Head
Caption = "打印表头"
Height = 375
Left = -73920
TabIndex = 7
Top = 1680
Width = 735
End
Begin VB.Label lbl_Title
Alignment = 2 'Center
Caption = "打印标题"
Height = 255
Left = -74760
TabIndex = 6
Top = 1980
Width = 5415
End
Begin VB.Label Label1
Caption = "打印标题"
Height = 255
Left = -74760
TabIndex = 4
Top = 1080
Width = 915
End
End
End
Attribute VB_Name = "SetPrn"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
SetObjFont lbl_Title
End Sub
Private Sub Command4_Click()
SetObjFont lbl_Head
End Sub
Private Sub Command5_Click()
SetObjFont lbl_Body
End Sub
Private Sub Command1_Click()
Dim i As Integer
Unload Me
End Sub
Private Sub txt_Title_Change()
lbl_Title = txt_Title
End Sub
Private Sub SetObjFont(Obj1 As Control)
With Obj1
Dlg1.Flags = cdlCFBoth
Dlg1.FontBold = .FontBold
Dlg1.FontSize = .FontSize
Dlg1.FontItalic = .FontItalic
Dlg1.FontName = .FontName
On Error GoTo ErrHand
Dlg1.ShowFont
.FontBold = Dlg1.FontBold
.FontSize = Dlg1.FontSize
.FontItalic = Dlg1.FontItalic
.FontName = Dlg1.FontName
End With
ErrHand:
'CommDlgs.DialogFont Me.hWnd, lbl_Title
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -