|
-
Mar 16th, 2009, 01:41 AM
#1
Thread Starter
Member
[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.
-
Mar 16th, 2009, 06:44 AM
#2
Re: Printer Dialog
 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
-
Mar 16th, 2009, 07:00 AM
#3
Thread Starter
Member
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
-
Mar 18th, 2009, 05:01 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|