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 = 8865
- Left = 1080
- LinkTopic = "Form1"
- ScaleHeight = 8460
- ScaleWidth = 6690
- Top = 1170
- Width = 6810
- Begin VB.CommandButton Command2
- Caption = "Command2"
- Height = 495
- Left = 2760
- TabIndex = 2
- Top = 3960
- Width = 1215
- End
- Begin VB.CommandButton Command1
- Caption = "Command1"
- Height = 495
- Left = 2760
- TabIndex = 1
- Top = 3960
- Width = 1215
- End
- Begin VB.Label Label1
- Caption = "Label1"
- Height = 495
- Left = 2760
- TabIndex = 0
- Top = 3960
- Width = 1215
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Dim printingCancelled As Boolean
- Private Sub Command1_Click()
- printingCancelled = False
- For i = 1 To 50010000
- DoEvents
- If printingCancelled = True Then
- printingCancelled = False
- Exit For
- End If
- Label1.Caption = "Printing " & i
- Printer.Print i
- Next i
- End Sub
- Private Sub Command2_Click()
- Printer.KillDoc
- printingCancelled = True
- End Sub
- Private Sub Form_Load()
- Label1.Left = 100
- Label1.TOP = 100
- Label1.Height = 200
- Label1.Caption = ""
- Command1.Left = 100
- Command1.TOP = 400
- Command1.Caption = "Start"
- Command2.Left = 1600
- Command2.TOP = 400
- Command2.Caption = "Cancel"
- Form1.Caption = "Visual Basic Printing Test"
- Form1.Height = 2000
- Form1.Width = 4000
- End Sub
-