Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
API call to change printer orientation to landscape
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00764222
Message ID:
00764262
Vues:
31
thanks for the reply. i have found that using BOTH John K's OCX and Martin's FLL both result in VFP hanging. I am beginning to wonder if i am unable to manipulate printer controls programmatically due to NOT having ADMIN rights on the network to do so.

>Chris,
>
>Are you starting and ending the Print Job yourself in code?
>
>After you start a Print Job with BeginDoc(), you need to then update the DEVMODE structure field for the Page Orientation before you call the StartPage() function. You also need to set the bit for the DM_ORIENTATION field by doing an OR with the DEVMODE dmFields with "DEVMODE.dmFields OR DM_ORIENTATION". This tells the DEVMODE structure that you are making and update to the DEVMODE dmOrientation Field with DMORIENT_LANDSCAPE or DMORIENT_PORTRAIT.
>
>Remeber to declare enough space to hold the DEVMODE structure in memory. All printer drivers return different lengths of due to Private data stored in the DEVMODE structure.
>
>Once you make an update to the DEVMODE structure you will then have to call the ResetDC() API function.
>
>Here is a link to the DEVMODE information on MSDN.
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_03g2.asp
>
>
>> I am using DBI-Tech's scheduler activex control and the print functions for this control do not allow the
>> user to specify output orientation. As a result, the user has to select landscape each time they print
>> via the printer dialogue box. Is there an API call available to turn orientation to landscape prior
>> to printing and back to portrait when done?
>
>> I have been testing John K's VBPrinter OCX (download 9588) that allows orientation control
>> but it causes VFP6 to hang (using W2k).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform