Results 1 to 6 of 6

Thread: Choosing printer.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Oporto, Portugal
    Posts
    134

    Post

    I have a .ini file were I want to place the printer name or port. I know how to do it. I don't know is how am I going to select that priter in my app. I'm tired of making my clients choos a printer (through diallog) evrey time they want to print if they have more than 1 printer in the PC.

    ------------------
    Jorge Ledo
    [email protected]
    Portugal

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Post

    you could try this
    i think - i have not tested it

    Code:
    Dim PrinterKey as string
    cdlgPrinter.showprinter
    PrinterKey = cdlgPrinter.printername
    savesetting ("My App", "Printing", "Default Printer", PrinterKey)
    
    AND TO GET IT:
    
    PrinterKey = getsetting ("My App", "Printing", "Default Printer")
    cdlgPrinter.PrinterName = PrinterKey
    cdlgprinter.show
    tell me how this works

    ------------------
    david
    Teenage Programmer


  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Oporto, Portugal
    Posts
    134

    Post

    No such a method ".printername" in a dialog box.

    But thanks for the efford.



    ------------------
    Jorge Ledo
    [email protected]
    Portugal were the sun allways shine... for programmers.

  4. #4
    Guest

    Post

    Dim ptr As Printer
    For Each ptr In Printers
    If ptr.DeviceName = "PrinterNameHere" Then
    Set Printer = ptr
    End If
    Next

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    Oporto, Portugal
    Posts
    134

    Post

    Thanks BG,

    Sometimes such a easy thing can give so much trouble.

    Thank you,

    A feeling so stupid portuguese,

    Jorge Ledo

  6. #6
    New Member
    Join Date
    Mar 2000
    Posts
    1

    i've tryied but not succeciful


    Dim ptr As Printer
    For Each ptr In Printers
    If ptr.DeviceName = "PrinterNameHere" Then
    Set Printer = ptr
    End If
    Next
    i've tryied it in vb6 and with win fax and a lex mark printer it did not worked ?
    Have I done something wrong ?

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