Printing from a Picturebox


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Printing from a Picturebox

  1. #1
    Join Date
    Jul 2004
    Posts
    366

    Question Printing from a Picturebox

    Good Afternoon All,

    I have 2 pictureboxes. Pb1 has data in it and Pb2 is used to write data on it using a mouse or pen, it's transparent so you can add notes.

    What I'm wanting to do is once a report is loaded into the Pb's I want to write that data in the pb's to a file. Sometimes there can be many pages to this report. So if there are 10 pages, I want all 10 images written to one file. I hope this makes sense!

    Any Ideas?

    Thanks in advance!

    jb

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    It would be something like
    Code:
    PictureBox1.Image.Save("C:\NewFileName.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
    Naturally, you can choose any image format available...I used jpeg as an example.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Jul 2004
    Posts
    366

    Thanks Hack.

    I'll work it and see what happens.


  4. #4
    Join Date
    Jul 2004
    Posts
    366
    How do I merge if you will the 2 pictureboxes into one? When looking at the form I'll see what looks like one report, but it's really 2 pb's displaying this one report. The code above will copy the contents of one of the pb but not both, how do I write both to one file?

  5. #5
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Probably the easiest way would be to create two files and then merge then into one.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. WebBrowser Control: Problem with Silent Printing
    By vb_programmer in forum VB Classic
    Replies: 0
    Last Post: 10-20-2006, 04:35 PM
  2. Replies: 1
    Last Post: 08-23-2005, 02:15 PM
  3. BitBlt to a PictureBox in VB.net
    By Simon in forum .NET
    Replies: 0
    Last Post: 05-30-2002, 06:59 AM
  4. Replies: 0
    Last Post: 01-25-2002, 05:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center