?? p_prnprv.frm
字號(hào):
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
Begin VB.Form PrnPRN
BorderStyle = 4 'Fixed ToolWindow
Caption = "Print"
ClientHeight = 2064
ClientLeft = 2172
ClientTop = 2316
ClientWidth = 4116
BeginProperty Font
Name = "Arial"
Size = 7.8
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "p_prnprv.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2064
ScaleWidth = 4116
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton Command4
Caption = "Select only active page"
Height = 288
Left = 900
TabIndex = 10
ToolTipText = "select activee (viewed) page"
Top = 468
Width = 3180
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
AutoRedraw = -1 'True
AutoSize = -1 'True
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 384
Left = 72
Picture = "p_prnprv.frx":0442
ScaleHeight = 384
ScaleWidth = 384
TabIndex = 9
Top = 72
Width = 384
End
Begin VB.ComboBox ePag
Height = 288
Left = 3312
Style = 2 'Dropdown List
TabIndex = 8
Top = 1116
Width = 768
End
Begin VB.ComboBox sPag
Height = 288
Left = 3312
Style = 2 'Dropdown List
TabIndex = 7
Top = 792
Width = 768
End
Begin VB.CommandButton Command3
Caption = "Pri&nter"
Height = 300
Left = 3060
TabIndex = 3
ToolTipText = "select printer"
Top = 1512
Width = 1020
End
Begin VB.CommandButton Command2
Caption = "A&bort"
Height = 300
Left = 1980
TabIndex = 2
ToolTipText = "exit"
Top = 1512
Width = 1020
End
Begin VB.CommandButton Command1
Caption = "&Print"
Height = 300
Left = 900
TabIndex = 1
ToolTipText = "print"
Top = 1512
Width = 1020
End
Begin VB.TextBox tPag
Height = 300
Left = 3312
Locked = -1 'True
TabIndex = 0
Top = 36
Width = 768
End
Begin MSComDlg.CommonDialog Apre
Left = 3096
Top = 2484
_ExtentX = 677
_ExtentY = 677
_Version = 327681
End
Begin VB.Shape pBar
BackColor = &H8000000D&
BackStyle = 1 'Opaque
Height = 192
Left = 0
Top = 1872
Width = 12
End
Begin VB.Shape tBar
BackColor = &H8000000F&
BackStyle = 1 'Opaque
Height = 192
Left = 0
Top = 1872
Width = 4116
End
Begin VB.Line Line2
X1 = 864
X2 = 4068
Y1 = 1440
Y2 = 1440
End
Begin VB.Line Line1
X1 = 864
X2 = 4068
Y1 = 396
Y2 = 396
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
Caption = "to page:"
Height = 228
Left = 900
TabIndex = 6
Top = 1152
Width = 2352
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
Caption = "print from page:"
Height = 228
Left = 900
TabIndex = 5
Top = 828
Width = 2352
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "Total preview pages:"
Height = 228
Left = 900
TabIndex = 4
Top = 72
Width = 2352
End
End
Attribute VB_Name = "PrnPrn"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Static sP As Integer, eP As Integer, Ret As Integer
sP = Val(sPag.Text)
eP = Val(ePag.Text)
If sP > eP Then
eP = sP
Ret = MsgBox("Page " + Format(sP) + "?", _
vbYesNo + vbQuestion, _
"Print")
Else
Ret = MsgBox("From page " + vbTab + Format(sP) + vbLf + _
"to page " + vbTab + Format(eP) + "?", _
vbYesNo + vbQuestion, _
"Print")
End If
If Ret = vbYes Then
NM_AnnullaStampa = False
TempStampa sP, eP
End If
End Sub
Private Sub Command2_Click()
NM_AnnullaStampa = True
Unload Me
End Sub
Private Sub Command3_Click()
Apre.Flags = cdlPDPrintSetup
Apre.Action = &H5
End Sub
Private Sub Command4_Click()
sPag.ListIndex = PrnPrv.ePag.ListIndex
ePag.ListIndex = PrnPrv.ePag.ListIndex
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then Unload Me
End Sub
Private Sub Form_Load()
tPag.Text = Format(PrnPrv.ePag.ListCount)
Static l As Integer
For l = 0 To PrnPrv.ePag.ListCount - 1
sPag.AddItem Format(l + 1)
ePag.AddItem Format(l + 1)
Next
sPag.ListIndex = 0
ePag.ListIndex = ePag.ListCount - 1
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -