Results 1 to 3 of 3

Thread: [Resolved] Showing Printer Preferences Page without CommonDialog

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2011
    Posts
    15

    Question [Resolved] Showing Printer Preferences Page without CommonDialog

    Hi guys!

    I'm writing a VB6 program that needs to print some forms and I don't want to use CommonDialog in it, cause I want to use this program in portable mode, without installation.

    I've found a code that shows the Printer Properties Page:
    Code:
    Private Declare Function SHInvokePrinterCommand Lib "shell32.dll" Alias "SHInvokePrinterCommandA" (ByVal hWnd As Long, ByVal uAction As Long, ByVal lBuf1 As String, ByVal lBuf2 As String, ByVal fModal As Boolean) As Long
    
    Private Sub Command1_Click()
    
    SHInvokePrinterCommand Me.hWnd, &H1, Printer.DeviceName, vbNull, False
    
    End Sub
    Thats enough for me, but... at the bottom of the properties page, there's a Command Button on the left that gives the Printer Preferences Page form...

    Anyone knows the API Function that calls/shows directly that Preferences Page? Can I invoke it at my Command1_Click() sub?

    Thanks in advance.

    Best regards.
    Last edited by Tedioboy; Jul 27th, 2011 at 03:53 AM.

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