Results 1 to 4 of 4

Thread: Forms and Pictures

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    12

    Post

    I want to print two pictures on an A4 sheet.
    At the moment I am copying the pictures to a background form and then printing to form.
    However, dependent on the screen resolution, only so much of the form is printed. I have tried making two smaller forms but they both require a printed page each, I cans deem to get them on one page.

    My questions are thus..

    Can I make a form bigger than the screen resolution?
    How do I print two forms on a single page?
    Can pictures be printed directly to the printer?

  2. #2
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    To print a picture:

    Dim width&, height&

    'example: picture will have a width of 10 cm, height proportional.
    width = 100 'mm
    height = width * Picture1.scaleHeight / picture1.ScaleWidth

    Printer.Paintpicture picture1.picture, 0, 0, width, height, 0, 0, picture1.ScaleWidth, picture1.ScaleHeight

    Printer.Enddoc

    ------------------
    Razzle
    ICQ#: 31429438

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    12

    Post

    That seems great.
    I hope it works in VB4!
    Now, how can I position this picture on the printed page?


    Originally posted by Razzle:
    To print a picture:

    Dim width&, height&

    'example: picture will have a width of 10 cm, height proportional.
    width = 100 'mm
    height = width * Picture1.scaleHeight / picture1.ScaleWidth

    Printer.Paintpicture picture1.picture, 0, 0, width, height, 0, 0, picture1.ScaleWidth, picture1.ScaleHeight

    Printer.Enddoc


  4. #4
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    I'm not sure, whether this works with VB4, but try it.
    To place it on the paper:
    The Printer.Paintpicture has the following parameters:
    Picture, x1, y1, Width1, Height1, x2, y2, Width2, Height2, OpCode

    Just experiment with the x1, y1 and x2, y2 parameters, this should do it

    ------------------
    Razzle
    ICQ#: 31429438

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width