home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmPaper
- BorderStyle = 1 'Fixed Single
- Caption = "Paper settings"
- ClientHeight = 3315
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 5055
- Icon = "frmPaper.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3315
- ScaleWidth = 5055
- StartUpPosition = 1 'CenterOwner
- Begin VB.CommandButton btnPaperOutlineColor
- Caption = "Choose color..."
- Height = 360
- Left = 2910
- TabIndex = 7
- Top = 2085
- Width = 1320
- End
- Begin VB.CommandButton btnPaperShadowColor
- Caption = "Choose color..."
- Height = 360
- Left = 390
- TabIndex = 5
- Top = 2085
- Width = 1320
- End
- Begin VB.CommandButton btnOK
- Caption = "OK"
- Height = 375
- Left = 1200
- TabIndex = 8
- Top = 2865
- Width = 870
- End
- Begin VB.CommandButton btnCancel
- Caption = "Cancel"
- Height = 375
- Left = 2175
- TabIndex = 15
- Top = 2880
- Width = 870
- End
- Begin VB.TextBox Text4
- Height = 375
- Left = 7095
- TabIndex = 12
- Text = "Text4"
- Top = 4980
- Width = 1335
- End
- Begin VB.TextBox Text3
- Height = 375
- Left = 6990
- TabIndex = 11
- Text = "Text3"
- Top = 4035
- Width = 1455
- End
- Begin VB.TextBox txtPageWidth
- Height = 285
- Left = 3525
- TabIndex = 3
- Text = "Text2"
- Top = 705
- Width = 765
- End
- Begin VB.TextBox txtPageHeight
- Height = 285
- Left = 3525
- TabIndex = 2
- Text = "Text1"
- Top = 330
- Width = 750
- End
- Begin VB.CommandButton btnPaperColor
- Caption = "Choose color..."
- Height = 360
- Left = 285
- TabIndex = 1
- Top = 690
- Width = 1320
- End
- Begin VB.CheckBox chckShowPaper
- Caption = "Show paper"
- Height = 375
- Left = 285
- TabIndex = 0
- Top = 240
- Value = 1 'Checked
- Width = 1215
- End
- Begin VB.Frame frOutline
- Caption = "Paper outline"
- Height = 1290
- Left = 2640
- TabIndex = 10
- Top = 1305
- Width = 2220
- Begin VB.CheckBox chckPaperOutline
- Caption = "Show paper outline"
- Height = 375
- Left = 225
- TabIndex = 6
- Top = 360
- Width = 1710
- End
- End
- Begin VB.Frame frShadow
- Caption = "Paper shadow"
- Height = 1290
- Left = 180
- TabIndex = 9
- Top = 1305
- Width = 2220
- Begin VB.CheckBox chckPaperShadow
- Caption = "Show paper shadow"
- Height = 375
- Left = 240
- TabIndex = 4
- Top = 360
- Width = 1860
- End
- End
- Begin VB.Label Label1
- Caption = "mm"
- Height = 225
- Index = 1
- Left = 4320
- TabIndex = 17
- Top = 810
- Width = 345
- End
- Begin VB.Label Label1
- Caption = "mm"
- Height = 225
- Index = 0
- Left = 4320
- TabIndex = 16
- Top = 390
- Width = 345
- End
- Begin VB.Label lblPageWidth
- Caption = "Page width:"
- Height = 255
- Left = 2565
- TabIndex = 14
- Top = 735
- Width = 975
- End
- Begin VB.Label lblPageHeight
- Caption = "Page height:"
- Height = 255
- Left = 2565
- TabIndex = 13
- Top = 375
- Width = 975
- End
- Attribute VB_Name = "frmPaper"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim fShowPaper, fShowPaperOutline, fShowPaperShadow As Boolean
- Dim crPaperShadowColor, crPaperOutlineColor, crPaperColor As OLE_COLOR
- Dim lPageHeight, lPageWidth As Long
- Private Sub btnCancel_Click()
- 'if user cancels, set back to initial values
- With pd_Page
- .ShowPaper = fShowPaper
- .ShowPaperOutline = fShowPaperOutline
- .ShowPaperShadow = fShowPaperShadow
- .Height = lPageHeight
- .Width = lPageWidth
- .PaperColor = crPaperColor
- .PaperShadowColor = crPaperShadowColor
- .PaperOutlineColor = crPaperOutlineColor
- End With
- Unload Me
- End Sub
- Private Sub btnOK_Click()
- Unload Me
- End Sub
- Private Sub btnPaperColor_Click()
- With pd_Page
- .PaperColor = SetColor(.PaperColor)
- End With
- End Sub
- Private Sub btnPaperOutlineColor_Click()
- With pd_Page
- .PaperOutlineColor = SetColor(.PaperOutlineColor)
- End With
- End Sub
- Private Sub btnPaperShadowColor_Click()
- With pd_Page
- .PaperShadowColor = SetColor(.PaperShadowColor)
- End With
- End Sub
- Private Sub chckPaperOutline_Click()
- pd_Page.ShowPaperOutline = CBool(chckPaperOutline)
- End Sub
- Private Sub chckPaperShadow_Click()
- pd_Page.ShowPaperShadow = CBool(chckPaperShadow)
- End Sub
- Private Sub chckShowPaper_Click()
- pd_Page.ShowPaper = CBool(chckShowPaper)
- End Sub
- Private Sub Form_Load()
- 'saving initial values
- With pd_Page
- fShowPaper = .ShowPaper
- fShowPaperOutline = .ShowPaperOutline
- fShowPaperShadow = .ShowPaperShadow
- lPageHeight = .Height
- lPageWidth = .Width
- crPaperColor = .PaperColor
- crPaperShadowColor = .PaperShadowColor
- crPaperOutlineColor = .PaperOutlineColor
- End With
- chckShowPaper.Value = Abs(fShowPaper)
- chckPaperOutline.Value = Abs(fShowPaperOutline)
- chckPaperShadow.Value = Abs(fShowPaperShadow)
- txtPageHeight = lPageHeight
- txtPageWidth = lPageWidth
- End Sub
- Private Sub txtPageHeight_LostFocus()
- If NumberGreaterThanZero(txtPageHeight) Then pd_Page.Height = txtPageHeight
- End Sub
- Private Sub txtPageWidth_LostFocus()
- If NumberGreaterThanZero(txtPageWidth) Then pd_Page.Width = txtPageWidth
- End Sub
-