Results 1 to 3 of 3

Thread: How to get printer preference?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    How to get printer preference?

    I able to populate available printer device in combo box. I want to get printer preference of choice using API. How to do that?

    Code:
    Private Sub Form_Load()
    'Add all the available printers to the combo box
    For i% = 0 To Printers.Count - 1
        Combo1.AddItem Printers(i%).DeviceName
    Next i%
    
    'Display the default printer
    For i% = 0 To Combo1.ListCount - 1
    If Combo1.List(i%) = Printer.DeviceName Then
    Combo1.ListIndex = i%
    Exit For
    End If
    Next i%
    End Sub

  2. #2

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: How to get printer preference?

    Actually I able to get the printer devices list from my control penal and populate it into combo box. Once it populate, it display the default printer. In my combo box, I have 3 list printer devices, and populate the printer default devices as first combo box listindex.


    How to get the printer preference like the attach below?I dont' want use common dialog. I want to get the printer preference from the combo box list.
    Attached Images Attached Images  

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