Results 1 to 6 of 6

Thread: what is the code for printer from

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    syria
    Posts
    854

    what is the code for printer from

    what is the copde of printer the data in text and in picture
    and thankyou for all

  2. #2
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    Print text.

    VB Code:
    1. Printer.Print Text1.Text

    There are various ways to print a picture, usually API.
    Last edited by Keithuk; Dec 29th, 2004 at 05:43 PM.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    syria
    Posts
    854
    thankyou mr Keithuk
    for help.

  4. #4
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    That was just a simple on line explanation.

    VB Code:
    1. Printer.FontName = "Arial" 'The name of the font used in printing
    2. Printer.FontSize = 12 'The font size
    3. Printer.FontBold = True 'Bold is turned on
    4. Printer.FontUnderline = True 'Underline is turned on
    5. Printer.Print "This is a printer test" 'Print a test line
    6. Printer.FontBold = False 'Bold turned off
    7. Printer.FontUnderline = False 'Underline is turned off
    8. Printer.Print 'prints a blank line
    9. Printer.Print Text1.Text 'Prints all text in Text1
    10. Printer.EndDoc 'Terminates a print operation sent to the Printer _
    11. 'object, releasing the document to the print device or spooler.

    All this info in in the VB6 help, which I don't think you have.
    Last edited by Keithuk; Dec 29th, 2004 at 05:43 PM.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    syria
    Posts
    854
    thankyou mr for your interesting
    I have another question if you allow
    waht is the code for print the data from the object a picture
    like lines
    thankyou for your generosity

  6. #6
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    Here are a couple of apps that will print pictures.

    The Print Picture.zip uses Apigid32.dll (enclosed). Just place it in your Windows\System folder there is no need to register it. It will print a normal VB picture and an enlarged one to fit A4 paper.

    I've used VB4 16bit and VB5. If I used PrintForm there was no problem, full form print. With VB6 if I use PrintForm I only get a quarter of the form, using the same printer. So now I use the enlarged one.

    Experiment, have fun.

    Attached Files Attached Files
    Last edited by Keithuk; Dec 5th, 2004 at 09:06 AM.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

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