CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2005
    Posts
    4

    Printer Object & Commondialog cotrol

    Hi

    I am using printer object for printing a receipt
    I want to use the commondialog.showprinter to give the user the ability to select the printer before he print the reciept
    and then asign it to the printer object using
    I dont want to change the system default printer

    the unkonwn point to me is how to do the assignment
    here is a sample of the code"


    CommonDialog1.PrinterDefault = False
    CommonDialog1.ShowPrinter
    Set Printer = ?????????????

    Regards

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Printer Object & Commondialog cotrol

    Code:
    Dim PrinterName As String 'current printer
    PrinterName = Printer.DeviceName
    Hope it helps!

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

Featured