home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "Print"
- ClientHeight = 5655
- ClientLeft = 1965
- ClientTop = 2970
- ClientWidth = 10110
- Height = 6345
- Left = 1905
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5655
- ScaleWidth = 10110
- Top = 2340
- Width = 10230
- Begin VB.TextBox Text1
- Height = 285
- Left = 8880
- TabIndex = 9
- Top = 120
- Width = 975
- End
- Begin VB.TextBox Text4
- Height = 285
- Left = 8880
- TabIndex = 7
- Top = 1200
- Width = 975
- End
- Begin VB.TextBox Text3
- Height = 285
- Left = 8880
- TabIndex = 6
- Top = 840
- Width = 975
- End
- Begin VB.TextBox Text2
- Height = 285
- Left = 8880
- TabIndex = 5
- Top = 480
- Width = 975
- End
- Begin VB.CommandButton Command1
- Caption = "&Print"
- Height = 495
- Left = 8160
- TabIndex = 0
- Top = 2520
- Width = 1215
- End
- Begin ik32Lib.Picbuf Picbuf1
- Height = 4095
- Left = 120
- TabIndex = 11
- Top = 0
- Width = 5175
- _Version = 65536
- _ExtentX = 9128
- _ExtentY = 7223
- _StockProps = 253
- End
- Begin VB.Label Label6
- Alignment = 2 'Center
- Caption = "The text along the bottom of the PicBuf will print along with the image."
- Height = 615
- Left = 7560
- TabIndex = 10
- Top = 1680
- Width = 2535
- End
- Begin VB.Label lblMKOCX
- Alignment = 2 'Center
- Caption = "Buy MediaKnife OCX for all your multimedia needs!"
- Height = 255
- Left = 1800
- TabIndex = 8
- Top = 5400
- Width = 3975
- End
- Begin VB.Label Label4
- Caption = "PrintTop"
- Height = 255
- Left = 7800
- TabIndex = 4
- Top = 1200
- Width = 975
- End
- Begin VB.Label Label3
- Caption = "PrintLeft"
- Height = 255
- Left = 7800
- TabIndex = 3
- Top = 840
- Width = 975
- End
- Begin VB.Label Label2
- Caption = "PrintWidth"
- Height = 255
- Left = 7800
- TabIndex = 2
- Top = 480
- Width = 975
- End
- Begin VB.Label Label1
- Caption = "PrintHeight"
- Height = 255
- Left = 7800
- TabIndex = 1
- Top = 120
- Width = 975
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuExit
- Caption = "E&xit"
- Shortcut = ^X
- End
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- 'Description: This code prints the picbuf and its surrounding
- 'labels to the printer using pixels as units.
- Private Sub Command1_Click()
- Printer.ScaleMode = 3
- Printer.Print
- Picbuf1.PrintHeight = Val(Text1)
- Picbuf1.PrintWidth = Val(Text2)
- Picbuf1.PrintLeft = Val(Text3)
- Picbuf1.PrintTop = Val(Text4)
- Picbuf1.PrinterhDC = Printer.hDC
- Printer.CurrentX = Picbuf1.PrintLeft
- Printer.CurrentY = Picbuf1.PrintTop + Picbuf1.PrintHeight
- Printer.Print lblMKOCX
- 'tell the printer we are done printing
- Printer.EndDoc
- End Sub
- 'Description: This code sets up the picbuf to be
- 'printed
- Private Sub Form_Load()
- 'This sets up the picbuf with an image, and
- 'sets autosize to true
- Picbuf1.AutoSize = True
- InitPicbuf Picbuf1, False, "Marybeth.tif"
- 'This centers the label according to the
- 'image
- lblMKOCX.Top = Picbuf1.Top + Picbuf1.Height
- lblMKOCX.Left = Picbuf1.Width / 2 - lblMKOCX.Width / 2
- 'this will make the printed image the same size
- 'as it is on screen.
- Text1 = Int(Picbuf1.Yresolution * Screen.TwipsPerPixelY / Printer.TwipsPerPixelY)
- Text2 = Int(Picbuf1.Xresolution * Screen.TwipsPerPixelX / Printer.TwipsPerPixelX)
- Text3 = 0
- Text4 = 0
- End Sub
- Private Sub mnuExit_Click()
- ExitProgram
- End Sub
-