📄 dlgpagesetup.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form DlgPageSetup
BorderStyle = 3 'Fixed Dialog
Caption = "Page Setup"
ClientHeight = 3195
ClientLeft = 45
ClientTop = 330
ClientWidth = 5175
Icon = "DlgPageSetup.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 5175
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancel"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 4020
TabIndex = 21
Top = 2640
Width = 1020
End
Begin VB.CommandButton cmdOK
Caption = "OK"
Default = -1 'True
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 2880
TabIndex = 20
Top = 2640
Width = 1020
End
Begin VB.Frame FramEdge
Caption = "From edge"
Height = 975
Left = 240
TabIndex = 13
Top = 2040
Width = 2415
Begin MSComCtl2.UpDown UDHeader
Height = 285
Left = 1920
TabIndex = 14
Top = 255
Width = 240
_ExtentX = 423
_ExtentY = 503
_Version = 393216
OrigLeft = 2160
OrigTop = 840
OrigRight = 2400
OrigBottom = 1125
Max = 99
Enabled = -1 'True
End
Begin MSComCtl2.UpDown UDFooter
Height = 285
Left = 1920
TabIndex = 15
Top = 615
Width = 240
_ExtentX = 423
_ExtentY = 503
_Version = 393216
OrigLeft = 2160
OrigTop = 840
OrigRight = 2400
OrigBottom = 1125
Max = 99
Enabled = -1 'True
End
Begin VB.TextBox txtHeader
Height = 285
Left = 1200
TabIndex = 16
Text = "0.5"
Top = 240
Width = 975
End
Begin VB.TextBox txtFooter
Height = 285
Left = 1200
TabIndex = 17
Text = "0.5"
Top = 600
Width = 975
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "Footer:"
Height = 195
Left = 240
TabIndex = 19
Top = 645
Width = 495
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "Header:"
Height = 195
Left = 240
TabIndex = 18
Top = 285
Width = 570
End
End
Begin MSComCtl2.UpDown UDLeft
Height = 285
Left = 2160
TabIndex = 1
Top = 1215
Width = 240
_ExtentX = 423
_ExtentY = 503
_Version = 393216
OrigLeft = 2160
OrigTop = 840
OrigRight = 2400
OrigBottom = 1125
Max = 99
Enabled = -1 'True
End
Begin MSComCtl2.UpDown UDRight
Height = 285
Left = 2160
TabIndex = 3
Top = 1575
Width = 240
_ExtentX = 423
_ExtentY = 503
_Version = 393216
OrigLeft = 2160
OrigTop = 840
OrigRight = 2400
OrigBottom = 1125
Max = 99
Enabled = -1 'True
End
Begin VB.TextBox txtLeft
Height = 285
Left = 1440
TabIndex = 2
Text = "0"
Top = 1200
Width = 975
End
Begin VB.TextBox txtRight
Height = 285
Left = 1440
TabIndex = 4
Text = "0"
Top = 1560
Width = 975
End
Begin MSComCtl2.UpDown UDTop
Height = 285
Left = 2160
TabIndex = 7
Top = 495
Width = 240
_ExtentX = 423
_ExtentY = 503
_Version = 393216
OrigLeft = 2160
OrigTop = 840
OrigRight = 2400
OrigBottom = 1125
Max = 99
Enabled = -1 'True
End
Begin MSComCtl2.UpDown UDBottom
Height = 285
Left = 2160
TabIndex = 9
Top = 855
Width = 240
_ExtentX = 423
_ExtentY = 503
_Version = 393216
OrigLeft = 2160
OrigTop = 840
OrigRight = 2400
OrigBottom = 1125
Max = 99
Enabled = -1 'True
End
Begin VB.TextBox txtTop
Height = 285
Left = 1440
TabIndex = 8
Text = "0"
Top = 480
Width = 975
End
Begin VB.TextBox txtBottom
Height = 285
Left = 1440
TabIndex = 10
Text = "0"
Top = 840
Width = 975
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "Top:"
Height = 195
Left = 480
TabIndex = 12
Top = 525
Width = 330
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Bottom:"
Height = 195
Left = 480
TabIndex = 11
Top = 885
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Left:"
Height = 195
Left = 480
TabIndex = 6
Top = 1245
Width = 315
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "Right:"
Height = 195
Left = 480
TabIndex = 5
Top = 1605
Width = 420
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
BorderStyle = 6 'Inside Solid
Index = 1
X1 = 960
X2 = 5040
Y1 = 240
Y2 = 240
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Margins"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 240
TabIndex = 0
Top = 120
Width = 555
End
Begin VB.Line Line1
BorderColor = &H00808080&
BorderWidth = 2
Index = 0
X1 = 960
X2 = 5040
Y1 = 240
Y2 = 240
End
End
Attribute VB_Name = "DlgPageSetup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Dim LeftM As Double
Dim RightM As Double
Dim TopM As Double
Dim BottomM As Double
Dim HeaderM As Double
Dim FooterM As Double
If Not IsNumeric(txtTop) Then
MsgBox "This is not a valid measurement.", vbExclamation
txtTop.SetFocus
Exit Sub
End If
If Not IsNumeric(txtBottom) Then
MsgBox "This is not a valid measurement.", vbExclamation
txtBottom.SetFocus
Exit Sub
End If
If Not IsNumeric(txtLeft) Then
MsgBox "This is not a valid measurement.", vbExclamation
txtLeft.SetFocus
Exit Sub
End If
If Not IsNumeric(txtRight) Then
MsgBox "This is not a valid measurement.", vbExclamation
txtRight.SetFocus
Exit Sub
End If
If Not IsNumeric(txtHeader) Then
MsgBox "This is not a valid measurement.", vbExclamation
txtHeader.SetFocus
Exit Sub
End If
If Not IsNumeric(txtFooter) Then
MsgBox "This is not a valid measurement.", vbExclamation
txtFooter.SetFocus
Exit Sub
End If
TopM = txtTop.Text
BottomM = txtBottom.Text
LeftM = txtLeft.Text
RightM = txtRight.Text
HeaderM = txtHeader.Text
FooterM = txtFooter.Text
PageMarginTop = Format(TopM * (567 * 2.55), "0.0")
PageMarginBottom = Format(BottomM * (567 * 2.55), "0.0")
PageMarginleft = Format(LeftM * (567 * 2.55), "0.0")
PageMarginRight = Format(RightM * (567 * 2.55), "0.0")
HeaderMargin = Format(HeaderM * (567 * 2.55), "0.0")
FooterMargin = Format(FooterM * (567 * 2.55), "0.0")
Unload Me
MDIfrm.ActiveForm.DrawMeAgain
End Sub
Private Sub Form_Load()
txtTop.Text = Format(PageMarginTop / (567 * 2.55), "0.0")
txtBottom.Text = Format(PageMarginBottom / (567 * 2.55), "0.0")
txtLeft.Text = Format(PageMarginleft / (567 * 2.55), "0.0")
txtRight.Text = Format(PageMarginRight / (567 * 2.55), "0.0")
txtHeader.Text = Format(HeaderMargin / (567 * 2.55), "0.0")
txtFooter.Text = Format(FooterMargin / (567 * 2.55), "0.0")
End Sub
Private Sub UDTop_DownClick()
If CDbl(txtTop.Text) = 0 Then Exit Sub
txtTop.Text = CDbl(txtTop.Text) - 0.1
End Sub
Private Sub UDTop_UpClick()
If CDbl(txtTop.Text) = 99 Then Exit Sub
txtTop.Text = CDbl(txtTop.Text) + 0.1
End Sub
Private Sub UDBottom_DownClick()
If CDbl(txtBottom.Text) = 0 Then Exit Sub
txtBottom.Text = CDbl(txtBottom.Text) - 0.1
End Sub
Private Sub UDBottom_UpClick()
If CDbl(txtBottom.Text) = 99 Then Exit Sub
txtBottom.Text = CDbl(txtBottom.Text) + 0.1
End Sub
Private Sub UDLeft_DownClick()
If CDbl(txtLeft.Text) = 0 Then Exit Sub
txtLeft.Text = CDbl(txtLeft.Text) - 0.1
End Sub
Private Sub UDLeft_UpClick()
If CDbl(txtLeft.Text) = 99 Then Exit Sub
txtLeft.Text = CDbl(txtLeft.Text) + 0.1
End Sub
Private Sub UDright_DownClick()
If CDbl(txtRight.Text) = 0 Then Exit Sub
txtRight.Text = CDbl(txtRight.Text) - 0.1
End Sub
Private Sub UDright_UpClick()
If CDbl(txtRight.Text) = 99 Then Exit Sub
txtRight.Text = CDbl(txtRight.Text) + 0.1
End Sub
Private Sub UDHeader_DownClick()
If CDbl(txtHeader.Text) = 0 Then Exit Sub
txtHeader.Text = CDbl(txtHeader.Text) - 0.1
End Sub
Private Sub UDHeader_UpClick()
If CDbl(txtHeader.Text) = 99 Then Exit Sub
txtHeader.Text = CDbl(txtHeader.Text) + 0.1
End Sub
Private Sub UDFooter_DownClick()
If CDbl(txtFooter.Text) = 0 Then Exit Sub
txtFooter.Text = CDbl(txtFooter.Text) - 0.1
End Sub
Private Sub UDFooter_UpClick()
If CDbl(txtFooter.Text) = 99 Then Exit Sub
txtFooter.Text = CDbl(txtFooter.Text) + 0.1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -