Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change value of prtinfo(1)

Status
Not open for further replies.

Alf50

Technical User
Feb 3, 2017
5
DE
Prtinfo(1) is in that case 0;

with: cEmptystring = SYS(1037) I can change the orientation manually.

Are there any possibility to change the value of the orientation by program?

In this case I don't want to use a report.

Alfred

 
Two options come to mind. First:

Code:
KEYBOARD '{TAB}{TAB}a{ENTER}'
SYS(1037)

This will programmatically open the Page Setup dialogue, set the orientation to landscape, and close the dialogue.

The disadvantage is that the user will see the dialogue flash on the screen, which might be off-putting. Also, I'm not sure if the layout of the dialogue is the same for every printer, in which case the KEYBOARD command might neeed changing.

The other option is to create a copy of the printer driver (under a new name), and to set its orientation to landscape. Then, when you are ready to print, use SET PRINTER to select that driver.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hallo Mike,

I forget to say that I'm using Windows 10 pro and an older HP-printer(4050TN).

Now I have successfully installed a second version of the printer and your second option works perfect for me. [smile]

With kind regards
Alfred
 
Glad to hear it works, Alfred.

Regarding Windows 10, that shouldn't make any difference. The dialogue might be different, but the principle is the same: using the KEYBOARD command to programmatically select the required option. But never mind. Using a second printer driver would be my preferred solution.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top