home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form PrintForm
- BorderStyle = 3 'Fixed Dialog
- Caption = "Print"
- ClientHeight = 5295
- ClientLeft = 1995
- ClientTop = 2610
- ClientWidth = 6015
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 5700
- Left = 1935
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5295
- ScaleWidth = 6015
- ShowInTaskbar = 0 'False
- Top = 2265
- Width = 6135
- Begin VB.Frame Frame1
- Caption = "Placement (in DPI)"
- Height = 2265
- Left = 3840
- TabIndex = 4
- Top = 240
- Width = 1905
- Begin VB.TextBox DimDPI
- Height = 285
- Left = 930
- TabIndex = 13
- Text = "300"
- Top = 1815
- Width = 690
- End
- Begin VB.TextBox DimHeight
- Height = 285
- Left = 930
- TabIndex = 12
- Text = "300"
- Top = 1425
- Width = 690
- End
- Begin VB.TextBox DimWidth
- Height = 285
- Left = 930
- TabIndex = 11
- Text = "300"
- Top = 1035
- Width = 690
- End
- Begin VB.TextBox DimTop
- Height = 285
- Left = 930
- TabIndex = 10
- Text = "300"
- Top = 660
- Width = 690
- End
- Begin VB.TextBox DimLeft
- Height = 285
- Left = 930
- TabIndex = 9
- Text = "300"
- Top = 270
- Width = 690
- End
- Begin VB.Label Label5
- Caption = "DPI:"
- Height = 255
- Left = 195
- TabIndex = 14
- Top = 1845
- Width = 540
- End
- Begin VB.Label Label4
- Caption = "Height:"
- Height = 255
- Left = 195
- TabIndex = 8
- Top = 1470
- Width = 705
- End
- Begin VB.Label Label3
- Caption = "Width:"
- Height = 240
- Left = 195
- TabIndex = 7
- Top = 1095
- Width = 645
- End
- Begin VB.Label Label2
- Caption = "Left:"
- Height = 240
- Left = 195
- TabIndex = 6
- Top = 315
- Width = 450
- End
- Begin VB.Label Label1
- Caption = "Top:"
- Height = 240
- Left = 195
- TabIndex = 5
- Top = 705
- Width = 525
- End
- End
- Begin VB.CommandButton Cancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 375
- Left = 4215
- TabIndex = 3
- Top = 4680
- Width = 1200
- End
- Begin VB.CommandButton OK
- Caption = "OK"
- Default = -1 'True
- Height = 375
- Left = 600
- TabIndex = 1
- Top = 4680
- Width = 1200
- End
- Begin VB.CommandButton Preview
- Caption = "&Preview"
- Height = 375
- Left = 2460
- TabIndex = 2
- Top = 4680
- Width = 1200
- End
- Begin VB.PictureBox PageToPrint
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 3990
- Left = 240
- ScaleHeight = 264
- ScaleMode = 3 'Pixel
- ScaleWidth = 204
- TabIndex = 0
- TabStop = 0 'False
- Top = 480
- Width = 3090
- Begin LeadLib.Lead Lead1
- Height = 1185
- Left = 135
- Top = 120
- Width = 1395
- _version = 327681
- _extentx = 2461
- _extenty = 2090
- _stockprops = 97
- backcolor = 12583104
- End
- End
- Begin VB.Shape Shape1
- FillColor = &H00FFFFFF&
- FillStyle = 0 'Solid
- Height = 3975
- Left = 375
- Top = 360
- Width = 3105
- End
- Begin VB.Shape Shape2
- FillColor = &H00FFFFFF&
- FillStyle = 0 'Solid
- Height = 3975
- Left = 540
- Top = 240
- Width = 3075
- End
- Attribute VB_Name = "PrintForm"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Dim fPrintGo As Boolean
- Private Sub ResetAllRects(DispWidth%, DispHeight%)
- LEAD1.SetSrcRect 0, 0, LEAD1.BitmapWidth, LEAD1.BitmapHeight
- LEAD1.SetSrcClipRect 0, 0, LEAD1.BitmapWidth, LEAD1.BitmapHeight
- LEAD1.SetDstRect 0, 0, DispWidth, DispHeight
- LEAD1.SetDstClipRect 0, 0, DispWidth, DispHeight
- End Sub
- Public Function UserResult() As Boolean
- UserResult = fPrintGo
- End Function
- Public Sub GetDimensions(PrintLeft%, PrintTop%, PrintWidth%, PrintHeight%)
- PrintLeft = DimLeft
- PrintTop = DimTop
- PrintWidth = DimWidth
- PrintHeight = DimHeight
- End Sub
- Private Sub Cancel_Click()
- End Sub
- Private Sub Form_Load()
- fPrintGo = False
- LEAD1.AutoScroll = False
- LEAD1.AutoRepaint = False
- LEAD1.BackErase = True
- LEAD1.Bitmap = Main.ActiveForm.LEAD1.Bitmap
- Preview_Click
- Left = (Screen.Width - Width) / 2
- Top = (Screen.Height - Height) / 2
- End Sub
- Private Sub OK_Click()
- fPrintGo = True
- End Sub
- Private Sub Preview_Click()
- Dim NewLeft As Integer
- Dim NewTop As Integer
- Dim NewWidth As Integer
- Dim NewHeight As Integer
- NewLeft = CInt(CLng(DimLeft) * PageToPrint.ScaleWidth / DimDPI / 8.5)
- NewTop = CInt(CLng(DimTop) * PageToPrint.ScaleHeight / DimDPI / 11)
- NewWidth = CInt(CLng(DimWidth) * PageToPrint.ScaleWidth / DimDPI / 8.5)
- NewHeight = CInt(CLng(DimHeight) * PageToPrint.ScaleHeight / DimDPI / 11)
- ResetAllRects NewWidth, NewHeight
- LEAD1.Move NewLeft, NewTop, NewWidth, NewHeight
- LEAD1.ForceRepaint
- End Sub
-