home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / print / psout / psout.frm < prev    next >
Text File  |  1995-02-26  |  3KB  |  85 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "PostScript Printing"
  4.    ClientHeight    =   4635
  5.    ClientLeft      =   3000
  6.    ClientTop       =   2145
  7.    ClientWidth     =   3720
  8.    ControlBox      =   0   'False
  9.    Height          =   5160
  10.    Icon            =   PSOUT.FRX:0000
  11.    Left            =   2940
  12.    LinkMode        =   1  'Source
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   309
  17.    ScaleMode       =   3  'Pixel
  18.    ScaleWidth      =   248
  19.    Top             =   1680
  20.    Width           =   3840
  21.    Begin CommandButton Command1 
  22.       Caption         =   "Exit"
  23.       Height          =   375
  24.       Left            =   120
  25.       TabIndex        =   0
  26.       Top             =   3480
  27.       Width           =   3495
  28.    End
  29.    Begin CommandButton Command3 
  30.       Caption         =   "Print This Image"
  31.       Height          =   375
  32.       Left            =   120
  33.       TabIndex        =   1
  34.       Top             =   3000
  35.       Width           =   3495
  36.    End
  37.    Begin PictureBox Picture1 
  38.       AutoRedraw      =   -1  'True
  39.       AutoSize        =   -1  'True
  40.       Height          =   2730
  41.       Left            =   120
  42.       Picture         =   PSOUT.FRX:0302
  43.       ScaleHeight     =   2700
  44.       ScaleWidth      =   3450
  45.       TabIndex        =   2
  46.       Top             =   120
  47.       Width           =   3480
  48.    End
  49.    Begin Label Label2 
  50.       Alignment       =   2  'Center
  51.       Caption         =   "by Stephen Cramp - C/Systems 1992"
  52.       Height          =   255
  53.       Left            =   120
  54.       TabIndex        =   4
  55.       Top             =   4320
  56.       Width           =   3495
  57.    End
  58.    Begin Label Label1 
  59.       Alignment       =   2  'Center
  60.       Caption         =   "PostScript Printing Demo"
  61.       Height          =   255
  62.       Left            =   120
  63.       TabIndex        =   3
  64.       Top             =   3960
  65.       Width           =   3495
  66.    End
  67. End
  68. Sub Command1_Click ()
  69.     End
  70. End Sub
  71.  
  72. Sub Command3_Click ()
  73.     Const SRCCOPY = &HCC0020
  74.     Printer.ScaleMode = 3
  75.     Printer.CurrentY = 50
  76.     Printer.Print "   Sample of PostScript Printing"
  77.     Printer.Print "Program by Stephen Cramp - C/Systems"
  78.     Bits$ = String$(230 / 2 * 180, 0)
  79.     BitInfo$ = Chr$(40) + String$(3, 0) + Chr$(230) + String$(3, 0) + Chr$(180) + String$(3, 0) + Chr$(1) + Chr$(0) + Chr$(4) + Chr$(0) + String$(24, 0) + String$(64, 0)
  80.     ApiError% = GetDIBits(Picture1.hDC, Picture1.Image, 0, 180, Bits$, BitInfo$, 0)
  81.     ApiError% = StretchDIBits(Printer.hDC, 100, 150, 690, 540, 0, 0, 230, 180, Bits$, BitInfo$, 0, SRCCOPY)
  82.     Printer.EndDoc
  83. End Sub
  84.  
  85.