Dec 222017
 
Visual Basic .DLL to find and change the printer orientation.
File ORIENT.ZIP from The Programmer’s Corner in
Category BASIC Language
Visual Basic .DLL to find and change the printer orientation.
File Name File Size Zip Size Zip Type
PLAND.EXE 14276 5982 deflated
PORTLAND.EXE 17914 6588 deflated
PPORIENT.DLL 7002 3647 deflated
PPORT.EXE 14276 5982 deflated
P_L_DLL.FRM 1055 469 deflated
P_L_DLL.MAK 411 165 deflated
READ.ME 3121 895 deflated
TPCREAD.ME 199 165 deflated

Download File ORIENT.ZIP Here

Contents of the READ.ME file


Included:
--------------------------------------------------------------
PPORIENT.DLL - provides a means to find out and change the
windows default printer orientation

- copy to \windows\system directory

... declare below all on one line
Declare Function PPOrient Lib "PPORIENT.DLL"
(ByVal hWnd As Integer, ByVal Orient As Integer) As Integer

... Orient parameter = 0 ... returns current orientation
= 1 ... set to PORTRAIT
... returns orientation before
this call ( 1 or 2)
= 2 ... set to LANDSCAPE
... returns orientation before
this call ( 1 or 2)
= 3 ... toggles
... if was PORTRAIT, changes
to LANDSCAPE and vice versa
... returns orientation before
this call ( 1 or 2)
... good return codes = 1 ... printer was PORTRAIT
2 ... printer was LANDSCAPE
... error return codes = 8 ... bad Orient parameter
= 9 ... error accessing default
printer info

example calls:
was% = PPOrient(hWnd, 2) ... changes to landscape

MsgBox Str$(PPOrient(hWnd, 0)), 0, "Orientation"
... displays current orientation
--------------------------------------------------------------
P_L_DLL.MAK ... visual basic (2.0)
.FRM example of use
--------------------------------------------------------------
PORTLAND.EXE ... program to load in windows startup group
... stays iconized
... shows current printer orientation (P or L)
... double click to change orientation from P to L
or vice versa
PPORT.EXE ... program to load in windows startup group
... stays iconized
... double click to set orientation to Portrait
PLAND.EXE ... program to load in windows startup group
... stays iconized
... double click to set orientation to Landscape


Hope these are helpful. There are others(see WINP1.1 in basic forum,
WINPRTLS coming soon). If they prove useful, please send a $10 check
to PAUL POELLINGER
2019 Round Lake Drive
Houston, TX 77077
to help me justify deducting software upgrades on my taxes.

Let me know if you have any trouble or suggestions.

Paul Poellinger
Compuserve 70732,3576



 December 22, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)