Re: API PrntDlg function
- From: LondonLad <LondonLad@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 20 Jan 2009 01:32:00 -0800
"Mike Williams" wrote:
Hi Mike Williams
In reply to your helpful post the truthful answer is I do not know,
as I have said before I am a self taught newbie.
The post was because on a previous post it was said "I do not use Common
Dialog I use API's" so thats why I posted this question.
All of my printing has been created from information posted by you in
examples etc. I want to improve my project should I move on to to all API's?
if yes I will have to get a book.
Lay it on the line I will not be offended.
Ron
"LondonLad" <LondonLad@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message.
news:06ABD7AB-7132-4291-A40F-936E15453822@xxxxxxxxxxxxxxxx
I downloaded the DLL [vbprndlg] and put in the correct folder
and I have created the little program as instructed and I mostly
understand how that works. Is that all I have to do
You're supposed to also follow the instructions to register the DLL using
Regsvr32. Have you done that, and did you get a "success" message? When you
have done that, and in order to use the dll, you should start a new VB
project (one Form containing a Command Button) and use the Project /
References menu to set a reference to Microsoft VB Printer Dialog, which you
should find in the scrollable list if you registered the DLL properly. Then
you can paste the example code from the page where you downloaded the dll
into the Command Button's Click event and then run your code and click the
button. Does the example VB code run okay on your machine, and does it show
a printer dialog and write some results to the Debug window when you click
the Command Button?
I thought I would have to also use some API's I am
somewhat confussed, can you put me right please [1]
There was once a rather large block of code on the MSDN pages which used
various API functions to display a printer dialog and it included some code
allowing you to set up various start parameters for the dialog and to read
the results after your user had made his selections in it. The vbprndlg.dll
which you downloaded is an alternative way of doing the same thing. It does
more or less the same job without requiring you to use any API functions.
The code as it stands (the code example at the link where you just
downloaded the DLL) does not actually print anything, it merely sets the VB
Printer Object to the printer chosen in the dialog and transfers various
user settings (orientation, copies, etc) to it. In order to actually print
anything to the chosen printer you still need to use the VB Printer Object
printing methods in the normal way.
I thought I would have to also use some API's [2]
Just to make sure we're both talking about the same thing, in your original
post in this thread you said that you wanted to convert your printing from
the CommonDialog to the API. Did you mean that you wanted to use an API
printer dialog instead of the CommonDialog Control's printer dialog, so that
you could eliminate some of the shortcomings of the CommonDialog Control,
but that you wanted to still do your actual printing using the VB Printer
Object? Or did you perhaps mean that you wanted to do everything concerning
your printing, including showing the dialog and perfoming the actual print
job itself, using the various API methods and without using the VB Printer
Object at all?
Mike
- Follow-Ups:
- Re: API PrntDlg function
- From: Mike Williams
- Re: API PrntDlg function
- References:
- API PrntDlg function
- From: LondonLad
- Re: API PrntDlg function
- From: Micheal Williams'
- Re: API PrntDlg function
- From: LondonLad
- Re: API PrntDlg function
- From: Mike Williams
- API PrntDlg function
- Prev by Date: Re: Using Windows 7 Beta to test VB6 app installations?
- Next by Date: Registry Error.
- Previous by thread: Re: API PrntDlg function
- Next by thread: Re: API PrntDlg function
- Index(es):
Relevant Pages
|