Results 1 to 4 of 4

Thread: [RESOLVED] Printer Dialog

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2003
    Location
    Australia
    Posts
    34

    Resolved [RESOLVED] Printer Dialog

    Sorry - Posted this in API forum by accident earlier

    I notice the post regarding VB6 Printer Dialog using an API CALL

    This seems to work the way Microsoft Printer Dialogs should

    For some reason I believed you would use the CommonDialog to achieve the same thing (but of course I cannot get it to do anything other than CommonDialog)

    Is the API Call the only way to use a Printer Dialog ?

    Similarly, the other dialogs (Colour, Font) - Are they also an API Call ?


    I have found this (which works for Printers) but am still confused about the othet Dialog Boxes

    http://support.microsoft.com/kb/322710/en-us


    Thanks
    Last edited by George1111; Mar 16th, 2009 at 01:54 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Printer Dialog

    Quote Originally Posted by George1111
    For some reason I believed you would use the CommonDialog to achieve the same thing (but of course I cannot get it to do anything other than CommonDialog)
    Did you try
    Code:
    Private Sub Command1_Click()
    CommonDialog1.ShowPrinter
    End Sub
    Or perhaps
    Code:
    Private Sub Command1_Click()
    Shell ("rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder")
    End Sub

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2003
    Location
    Australia
    Posts
    34

    Re: Printer Dialog

    Well well well

    Thats how it should be - simple and to the point

    I have be scouring the internet and finding all sorts of wonderfully complex API calls to achieve 1 line of code

    Thanks - It had to be so easy as its already in windows

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Printer Dialog

    there is also an improved printer dialog from microsoft
    download and sample code from http://support.microsoft.com/kb/322710/EN-US/#7
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

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