?? 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 + -