Results 1 to 7 of 7

Thread: Printing in VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Location
    UK
    Posts
    6

    Printing in VB

    Hi

    I am writing a routine which lists through a text file and searches the directories on a PC the files. These files are .TIFF files and i want to print them. Whats the best way to do this, we use MS photoeditor to view them, can i call Photoeditor or can i print direct from VB?

    Any help very, very welcome

    Kevin


  2. #2
    Lively Member
    Join Date
    Jul 2002
    Posts
    69
    You could use a picturebox to load the tiff and then use the picturebox.print command
    "Help!!! I've installed Windows CE,ME and NT and now my computer runs like a brick" - shamelessly stolen sig

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Um... the Picturebox.Print doesn't print to the printer ..... it prints to the picturebox.... in other words if I put a pic box on a form then do PictureBox1.Print "Hello There!"... then the text, Hello There! shows up in the pic box... same as Form1.Print works....
    IF the TIFF extention is associated with a particular program, what you could do is a ShellExecute. Then hit the Print. It requires User intervention though.

    Anybody else???
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Location
    UK
    Posts
    6
    ..
    Ideally i would prefer no user intervention at all....


  5. #5
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    "... the Picturebox.Print doesn't print to the printer ..."

    Of course not. You will have "send" it to the Printer object. It may look something like the following:
    VB Code:
    1. Printer.PaintPicture Picture1.Picture, Printer.ScaleLeft, Printer.ScaleTop + 100 ', Printer.ScaleTop  'Printer.CurrentY
    Roy

  6. #6
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    in u'r component list there is a component called Kodak Image Edit Control.

    alot of filetypes are supported :



    try loading and printing it using this control.
    -= a peet post =-

  7. #7
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    I can be wrong but as far as I know Kodak Image Edit Control is not redistributable. You may need to obtain a special license for it.
    Roy

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