Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Printer Properties dialog
Message
De
18/07/2007 20:16:17
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
18/07/2007 15:36:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01241718
Message ID:
01241768
Vues:
24
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform