Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Printing problems in VB

Printing problems in VB

Scheduled Pinned Locked Moved Visual Basic
graphicsquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MyFathersSon
    wrote on last edited by
    #1

    Hi all, I'm trying to print out text and graphics on the same page using VB's Printer.Print For i = 0 To List2.ListCount - 1 Step 1 Printer.Print List2.List(i) Next i If Clipboard.GetFormat(vbCFBitmap) Then Printer.PaintPicture Clipboard.GetData(), 0, 0 Printer.EndDoc End If The graphics gets printed out, but the text from the list box doesn't. Any ideas on how I can resolve this? Thanks MyFathersSon

    O 1 Reply Last reply
    0
    • M MyFathersSon

      Hi all, I'm trying to print out text and graphics on the same page using VB's Printer.Print For i = 0 To List2.ListCount - 1 Step 1 Printer.Print List2.List(i) Next i If Clipboard.GetFormat(vbCFBitmap) Then Printer.PaintPicture Clipboard.GetData(), 0, 0 Printer.EndDoc End If The graphics gets printed out, but the text from the list box doesn't. Any ideas on how I can resolve this? Thanks MyFathersSon

      O Offline
      O Offline
      OldWarhorse
      wrote on last edited by
      #2

      Looks like the graphic might be overlaying the print buffer. I would try the simplest approach first, and put an EndDoc after the listbox loop and see if that will flush the buffer without advancing the page. Failing that, you might have to set the text and graphics onto a Form or Picture box first, and then call PrintForm.

      M 1 Reply Last reply
      0
      • O OldWarhorse

        Looks like the graphic might be overlaying the print buffer. I would try the simplest approach first, and put an EndDoc after the listbox loop and see if that will flush the buffer without advancing the page. Failing that, you might have to set the text and graphics onto a Form or Picture box first, and then call PrintForm.

        M Offline
        M Offline
        MyFathersSon
        wrote on last edited by
        #3

        Thanks for your suggestion. I placed a Printing.EndDoc statement as follows: For i = 0 To List2.ListCount - 1 Step 1 Printer.Print List2.List(i) Next i Printer.EndDoc ' added and this printed both text and graphic, but on separate pages. I'm not sure how to carry out your second suggestion. MyFathersSon

        O C 2 Replies Last reply
        0
        • M MyFathersSon

          Thanks for your suggestion. I placed a Printing.EndDoc statement as follows: For i = 0 To List2.ListCount - 1 Step 1 Printer.Print List2.List(i) Next i Printer.EndDoc ' added and this printed both text and graphic, but on separate pages. I'm not sure how to carry out your second suggestion. MyFathersSon

          O Offline
          O Offline
          OldWarhorse
          wrote on last edited by
          #4

          That's what I was afraid of... Been a long time since I messed with that. I wish I had a good example for you, but there should be a bunch of em out there (good ol' Google).

          M 1 Reply Last reply
          0
          • M MyFathersSon

            Thanks for your suggestion. I placed a Printing.EndDoc statement as follows: For i = 0 To List2.ListCount - 1 Step 1 Printer.Print List2.List(i) Next i Printer.EndDoc ' added and this printed both text and graphic, but on separate pages. I'm not sure how to carry out your second suggestion. MyFathersSon

            C Offline
            C Offline
            ChandraRam
            wrote on last edited by
            #5

            Did you try printing the graphics first? Chandra

            M 1 Reply Last reply
            0
            • C ChandraRam

              Did you try printing the graphics first? Chandra

              M Offline
              M Offline
              MyFathersSon
              wrote on last edited by
              #6

              I did but the results are the same. Thanks for your advice.

              1 Reply Last reply
              0
              • O OldWarhorse

                That's what I was afraid of... Been a long time since I messed with that. I wish I had a good example for you, but there should be a bunch of em out there (good ol' Google).

                M Offline
                M Offline
                MyFathersSon
                wrote on last edited by
                #7

                Thanks for your advice OldWarhorse. Not much on google.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups