home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / orient / read.txt < prev   
Text File  |  1993-02-06  |  3KB  |  64 lines

  1. Included:
  2.       --------------------------------------------------------------
  3.       PPORIENT.DLL  - provides a means to find out and change the
  4.                       windows default printer orientation
  5.  
  6.                     - copy to \windows\system directory
  7.  
  8.               ... declare below all on one line
  9.               Declare Function PPOrient Lib "PPORIENT.DLL"
  10.                  (ByVal hWnd As Integer, ByVal Orient As Integer) As Integer
  11.  
  12.                  ... Orient parameter = 0 ... returns current orientation
  13.                                       = 1 ... set to PORTRAIT
  14.                                           ... returns orientation before
  15.                                               this call ( 1 or 2)
  16.                                       = 2 ... set to LANDSCAPE
  17.                                           ... returns orientation before
  18.                                               this call ( 1 or 2)
  19.                                       = 3 ... toggles
  20.                                           ... if was PORTRAIT, changes
  21.                                               to LANDSCAPE and vice versa
  22.                                           ... returns orientation before
  23.                                               this call ( 1 or 2)
  24.                  ... good return codes = 1 ... printer was PORTRAIT
  25.                                          2 ... printer was LANDSCAPE
  26.                  ... error return codes = 8 ... bad Orient parameter
  27.                                         = 9 ... error accessing default
  28.                                                 printer info
  29.  
  30.               example calls:
  31.                       was% = PPOrient(hWnd, 2)  ... changes to landscape
  32.  
  33.                       MsgBox Str$(PPOrient(hWnd, 0)), 0, "Orientation"
  34.                                ... displays current orientation
  35.       --------------------------------------------------------------
  36.       P_L_DLL.MAK   ... visual basic (2.0)
  37.              .FRM       example of use
  38.       --------------------------------------------------------------
  39.       PORTLAND.EXE  ... program to load in windows startup group
  40.                     ... stays iconized
  41.                     ... shows current printer orientation (P or L)
  42.                     ... double click to change orientation from P to L
  43.                         or vice versa
  44.       PPORT.EXE     ... program to load in windows startup group
  45.                     ... stays iconized
  46.                     ... double click to set orientation to Portrait
  47.       PLAND.EXE     ... program to load in windows startup group
  48.                     ... stays iconized
  49.                     ... double click to set orientation to Landscape
  50.  
  51.  
  52. Hope these are helpful.  There are others(see WINP1.1 in basic forum,
  53. WINPRTLS coming soon).  If they prove useful, please send a $10 check
  54. to PAUL POELLINGER
  55.    2019 Round Lake Drive
  56.    Houston, TX  77077
  57. to help me justify deducting software upgrades on my taxes.
  58.  
  59. Let me know if you have any trouble or suggestions.
  60.  
  61.       Paul Poellinger
  62.       Compuserve 70732,3576
  63.  
  64.