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

Printing problems

Scheduled Pinned Locked Moved Visual Basic
questiongraphics
2 Posts 2 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I encounter problems when I try to print a text or a bitmap at the bottom of a page. My text or my bitmap are not printed entirely. How can I tell to VB to print my text or my bitmap in the next page ? Thks in advance. Appstmd

    D 1 Reply Last reply
    0
    • L Lost User

      I encounter problems when I try to print a text or a bitmap at the bottom of a page. My text or my bitmap are not printed entirely. How can I tell to VB to print my text or my bitmap in the next page ? Thks in advance. Appstmd

      D Offline
      D Offline
      David Wengier
      wrote on last edited by
      #2

      Appstmd wrote: How can I tell to VB to print my text or my bitmap in the next page ? VB will do this automatically for text you print using the Printer.Print method, but it is best to do it yourself. For text:

      If Printer.CurrentY + Printer.TextHeight(text_to_print) > Printer.ScaleHeight Then
      Printer.NewPage
      End If
      Printer.Print text_to_print

      And for bitmaps:

      Dim picBitmap as Picture
      Set picBitmap = LoadPicture(filename_of_bitmap)
      If Printer.CurrentY + (picBitmap.Height * Printer.TwipsPerPixelY) > Printer.ScaleHeight Then
      Printer.NewPage
      End If
      Printer.PaintPicture ......

      If you have the bitmap in a picturebox, just replace "picBitmap" in the above code with "Picture1.Picture" -- David Wengier Sonork ID: 100.14177 - Ch00k

      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