Results 1 to 6 of 6

Thread: Printing a Picture

  1. #1
    Guest

    Post

    On a form I have a picture box. Within this box i am drawing a line diagram using the line method and x and y cordinates. Its is a very complex diagram and using the x and y cordinates i allow the user the ability to select and change the size of the shapes within the drawing. The problem comes when i want to print. I cannot seem to find a way of printing the diagram as i will have to (i think) redraw it when i print. I am using VB6 and a jet 4.5 db.

    If anyone knows a solution to this i will be most greatful.

    Rich

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636

    Post

    If you did the lines with LINE function so
    you can write:

    Form1.PrintForm

    I think.
    thank you,
    Arie.

  3. #3
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485

    Post

    I don't have my programming with me but if you can't make something like form1.picture1.printform work then you could probably save the picture as .bmp then load it to another form and print:

    Form2_load()
    Form2.picture = Form1.picture1
    Form2.printform
    Form1.show
    unload.me
    End Sub

    Don't know if this helps,let me know.

  4. #4
    Guest

    Post

    Thanks for your help. You pointed me in the right direction, I found that if the AutoReDraw property is set to true I could use the picture boxes image property to assign to a forms picture property. The next problem is how to save this as a picture file like a BMP, GIF etc ?????

    Thanks

    Rich

  5. #5
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485

    Post

    'Use this:
    SavePicture Picture1.Image, "C:\PicFile.bmp"'

    If you want to get into this more,use the Common dialog box.I'm short on time,but if you want more help,I'll send you some CommonDialog code later.Just ask.
    Joey O.


  6. #6
    Lively Member *Super Sniper*'s Avatar
    Join Date
    Jan 2000
    Location
    Portland, OR
    Posts
    81

    Post

    You could also load it into a form that is plain white at the start. If you do this then you can just use form1.printform. It may be easiest just to draw & edit it on the form. Hope this helps!

    ------------------
    Website

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