Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Printer Properties dialog
Message
From
18/07/2007 20:16:17
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
18/07/2007 15:36:11
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01241718
Message ID:
01241768
Views:
23
>I'm working on a project where, for various reasons, the original developer used his own Print dialog rather than using the PROMPT keyword for reports. The client would like to have a Preferences button on that dialog that works like the one in VFP's Print dialog, that is, it should bring up the printer's native properties dialog.
>
>I've worked out the API calls I need to display the dialog. What I can't quite figure out is what to do so that the user's choices in that dialog apply to the document about to be printed.
>
>Can someone point me in the right direction?

Been there, sort of (had a client who wanted to hide printers which could produce readable files - so document writers, PS and PDF had to be taken out), so I also had to roll my own print dialog.

Luckily, didn't really have to have the printer properties button, but had to have the page range selector (did in Fox) and one more, I think it was number of copies.

In the end, it all depends on what does the printing. In my case, I had either a few frx reports, or a RTF OCX (3rd party) and I had to pass all these values somehow to that OCX. Don't remember exactly how I did it, tried a dozen ways and shoot me if I know which one worked. I think the trick was to set the selected printer as the default printer to whatever sends stuff to print, and then it uses the current settings for it.

I know this sounds murky - it is. Trying to do programmatically what Microsoft imagines must be clicked through is usually a long job; interfering with printing is worse by an order of magnitude.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform