Results 1 to 11 of 11

Thread: [RESOLVED] [2005] Converting Printing Code From VB 6.0

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2006
    Posts
    5

    Resolved [RESOLVED] [2005] Converting Printing Code From VB 6.0

    Hello to All:

    I have used Visual Basic 6.0 for a number of years now, and am working on converting some of my programs from VB 6.0 to Visual Basic 2005 Express Edition.

    The only problem I am having is with the printing code.

    In VB 6.0, all I had to do to print a line of text was say "Printer.Print <my text>".

    I searched on the Internet and found some sample code, which explained how to print using Visual Basic 2005 Express. However, the code required the user to keep track of the current position of the text, and the "Graphics Unit" for the "PrintDocument" control does NOT have a line option.

    I am trying to manually print some text from a listbox to create a print-out of a shopping list from the program. I need to print line by line and not worry about the current line position (as the number of lines for print-out varies).

    I am lost and have tried multiple things to get the code working in Visual Basic 2005, but I keep getting compile errors when I use the code found on the Internet. I am looking for an easy way to convert this code, which is hundreds of lines long.

    The code I am trying to convert is a bit long (and exceeded the maximum number of characters for this form), so I am posting a text document.

    Any help you can provide would be greatly appreciated.
    Attached Files Attached Files

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