home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 8460
- ClientLeft = 1140
- ClientTop = 1515
- ClientWidth = 6690
- Height = 8895
- Left = 1080
- LinkTopic = "Form1"
- ScaleHeight = 8460
- ScaleWidth = 6690
- Top = 1140
- Width = 6810
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub centerText(h As Integer, str As String)
- Dim pageMiddle As Integer
- pageMiddle = Printer.ScaleWidth / 2
- Printer.CurrentX = pageMiddle - (Printer.TextWidth(str) / 2)
- Printer.CurrentY = h
- Printer.Print str
- End Sub
- Private Sub Form_Click()
- ' Some Printers don't support copies
- On Error Resume Next
- Printer.Copies = 1
- On Error GoTo 0
- centerText 1440, "This text is centered."
- centerText 2880, "This text is centered also."
- Printer.EndDoc
- End Sub
-