home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / source / chap12 / prtpic.frm < prev    next >
Text File  |  1995-10-11  |  2KB  |  67 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   5550
  5.    ClientLeft      =   3675
  6.    ClientTop       =   5280
  7.    ClientWidth     =   6690
  8.    Height          =   5985
  9.    Left            =   3615
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   5550
  12.    ScaleWidth      =   6690
  13.    Top             =   4905
  14.    Width           =   6810
  15.    Begin VB.PictureBox Picture1 
  16.       Height          =   495
  17.       Left            =   2760
  18.       ScaleHeight     =   435
  19.       ScaleWidth      =   1155
  20.       TabIndex        =   0
  21.       Top             =   2520
  22.       Width           =   1215
  23.    End
  24. End
  25. Attribute VB_Name = "Form1"
  26. Attribute VB_Creatable = False
  27. Attribute VB_Exposed = False
  28. Private Sub Form_Load()
  29. Picture1.Picture = LoadPicture("SAMS.ICO")
  30. ' Prevent an error if the property doesn't exist
  31. On Error Resume Next
  32. Printer.Copies = 1
  33.  
  34. startX = 100
  35. startY = 100
  36. Printer.PaintPicture Picture1.Picture, _
  37.     startX, startY, Picture1.Width, Picture1.Height
  38.  
  39. nextY = startY + Picture1.Height + 200
  40. Printer.PaintPicture Picture1.Picture, _
  41.     startX, nextY, Picture1.Width * 2, Picture1.Height * 2
  42.  
  43. nextX = startX + Picture1.Width * 2
  44. nextY = nextY + (Picture1.Height * 4) + 200
  45. Printer.PaintPicture Picture1.Picture, _
  46.     nextX, nextY, Picture1.Width * -2, Picture1.Height * -2
  47.  
  48. Printer.EndDoc
  49. Printer.Copies = 1
  50. startX = 100
  51. startY = 100
  52. Printer.PaintPicture Picture1.Picture, _
  53.     startX, startY, Picture1.Width, Picture1.Height
  54.  
  55. nextY = startY + Picture1.Height + 200
  56. Printer.PaintPicture Picture1.Picture, _
  57.     startX, nextY, Picture1.Width * 2, Picture1.Height * 2
  58.  
  59. nextX = startX + Picture1.Width * 2
  60. nextY = nextY + (Picture1.Height * 4) + 200
  61. Printer.PaintPicture Picture1.Picture, _
  62.     nextX, nextY, Picture1.Width * -2, Picture1.Height * -2
  63.  
  64. Printer.EndDoc
  65.  
  66. End Sub
  67.