CompuServe Messages

#Printer Orientation

    15-Oct-91 08:15:26
Sb: #Printer Orientation
Fm: Nelson Ford 71355,470
To: Dennis L. Harrington 76216,3472
As we've discussed via Email, the routine you posted in a message for changing the orientation of the printer between Landscape and Portrait works, but I have to print a page to get it to take effect. I fixed some typos in the code and added it to the new VBTIPS file on DL1, but here it is again: GLOBAL: Type ORIENT Orientation as Long Pad as string * 16 End Type Declare Function PrtOrient% Lib "GDI" Alias "Escape" (ByVal hDc%, ByVal nEsc%, ByVal nLen%, lpData as ORIENT, lpOut as Any) Global prtO as Orient Sub Form_Click prtO.Orientation = n 'n=1 for portrait or 2 for landscape x% = PrtOrient%(Printer.hDC, 30, len(prtO), prtO, 0&) Printer.Print "whatever text you want to print goes here" Printer.EndDoc End Sub It's like the change doesn't take effect until after an EndDoc has been issued, which isn't very desirable. If anyone can shed any light on this, I would appreciate it. There are 4 Replies.