📄 frmprint.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
Begin VB.Form frmprint
Caption = "报表打印"
ClientHeight = 1140
ClientLeft = 375
ClientTop = 3555
ClientWidth = 5130
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1140
ScaleWidth = 5130
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command3
Caption = "打印预览(&V)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1800
TabIndex = 4
Top = 540
Width = 1545
End
Begin VB.TextBox Text1
Height = 270
Left = 330
TabIndex = 3
Top = 990
Visible = 0 'False
Width = 585
End
Begin MSComDlg.CommonDialog cd1
Left = 4560
Top = 30
_ExtentX = 847
_ExtentY = 847
_Version = 327681
End
Begin VB.CommandButton Command2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 3390
TabIndex = 2
Top = 540
Width = 1635
End
Begin VB.CommandButton Command1
Caption = "打印设置(&S)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 120
TabIndex = 1
Top = 540
Width = 1635
End
Begin VB.Label Label1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 150
TabIndex = 0
Top = 120
Width = 4815
End
End
Attribute VB_Name = "frmprint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
cd1.ShowPrinter
End Sub
Private Sub Command2_Click()
Select Case Me.Command2.Caption
Case "开始打印"
hxfyn = MsgBox("请安装16开纸(竖放)后按确定开始打印!", 48, "装纸提示")
Me.Label1.Caption = "正在打印......"
Me.Refresh
If Len(Trim(Text1.Text)) > 0 And filef(Trim(Text1.Text)) Then
mychar = hxfprint(Text1.Text)
Me.Label1.Caption = "打印完毕,单击返回按钮返回!"
Me.Command2.Caption = "返回"
Me.Command2.Cancel = True
Else
Me.Label1.Caption = "打印文件出现错误,请返回!"
Me.Command2.Caption = "返回"
Me.Command2.Cancel = True
End If
Case "返回"
Unload Me
Unload frmprintview
Unload Frmxsjbxxdy
End Select
End Sub
Private Sub Command3_Click()
printwi (xtlj & "rpt\print.txt")
End Sub
Private Sub Form_Load()
Me.Command2.Caption = "开始打印"
Me.Command2.Cancel = False
Me.Command2.Default = True
Me.Label1.Caption = "单击相应按钮进行打印设置或打印!"
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload frmprintview
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -