home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_2 / X_TAL4 / XTAL_DLL.DOC < prev    next >
Encoding:
Text File  |  1993-08-28  |  4.3 KB  |  112 lines

  1.  
  2.                        Documentation for XTAL.DLL
  3.  
  4. August 28, 1993
  5.  
  6.  
  7. XTALUDL.DLL by Robert J. Johnston, Burlingame, CA, USA.
  8. XTALUDL.DLL Copyright (c) 1993 Robert J. Johnston. All rights reserved.
  9. No charge, and you can distribute XTAL.DLL free of charge to others.
  10.  
  11.  
  12. Files uploaded:
  13.  
  14. XTALUDL.DLL       
  15.  
  16. XDLLDEMO.MAK  (Demo source and executable)
  17. DEMODLL.FRM
  18. DEMODLL2.FRM
  19. DEMODLL3.FRM
  20. DEMODLL.BAS
  21. XDLLDEMO.EXE
  22.  
  23. XTAL_DLL.DOC  (This file)
  24.  
  25.  
  26. Install XTALUDL.DLL in your WINDOWS\SYSTEM subdirectory. Make sure you don't
  27. have copies hanging around in other other paths or in the demo directory.
  28.  
  29. Install the demo, XDLLDEMO.EXE, in a directory of your choice. Run the demo,
  30. XDLLDEMO.EXE. Source code for XDLLDEMO.EXE is included--modify, copy as 
  31. you wish. 
  32.  
  33. When selecting a directory for the "Report Title" demo, you must select
  34. a file in the common dialog box.
  35.  
  36.  
  37. XTALUDL.DLL declarations for Visual Basic calls:
  38.  
  39.   Note: None of the string parameters require a null terminating Chr$(0).
  40.  
  41.   Declare Sub GetSetLabelDimensions Lib "XTALUDL.DLL" (ByVal lpszFileName$, lpDimensions As LABEL_DIMENSIONS, ByVal nAction%, lpErrcode%)
  42.   
  43.     lpszFileName$: full path of a Crystal Report file (.rpt) to modify or read.
  44.     lpszDimensions: defined type containing label dimension data (see Demo).
  45.     nAction% : 1 to get dimensions; 2 to set dimensions.
  46.     lpErrcode% : programmer defined codes.
  47.  
  48.     Get the dimensions first, then change the dimensions desired, and 
  49.     finally pass back to set the dimensions. Values of zero are not
  50.     ignored. This lets you have more control.
  51.  
  52.     It is possible to use this same sub to get and set the printer margins
  53.     of regular reports. In this case, the label dimensions will be ignored,
  54.     although you will get an error code of 32003. If a regular report 
  55.     was never set up for a printer ("Set Printer" menu item in Crystal 
  56.     Reports), then you won't be able to get or set printer margins, and you
  57.     will get error code 32002. If you get error code 32002, then you
  58.     know the report is not set up for labels.
  59.   
  60.     You will get error code 32003 if the report was designed for labels but
  61.     no fields have been placed on the report.  
  62.  
  63.  
  64.   Declare Sub GetReportTitle Lib "XTALUDL.DLL" (ByVal lpszFileName$, ByVal lpszReportTitle$, ByVal lpszReportComment$, lpErrcode%)
  65.  
  66.     lpszFileName$: full path name of a Crystal Report file (.rpt) to read.
  67.     lpszReportTitle$: String to contain title passed back.   
  68.                       Maximum length of string is 512. 
  69.     lpszReportComment$: String to contain comment passed back. Upon return,
  70.                       this will be blank if there was no comment. No error
  71.                       code is returned if there isn't a comment. 
  72.                       Maximum length of string is 1024.
  73.     lpErrcode%: programmer defined codes.
  74.  
  75.  
  76.   Declare Sub SetFontAll Lib "XTALUDL.DLL" (ByVal lpszFileName$, ByVal lpszFaceName$, ByVal nFontsize%, lpErrcode%)
  77.  
  78.     lpszFileName$: full path name of a Crystal Report file (.rpt) to modify.
  79.     lpszFaceName$: font facename to apply to all objects. No change is made
  80.                     if you pass a null string, "".  If you pass anything
  81.                     else and the font isn't supported you will get an 
  82.                     error. Make sure to observe upper and lowercase--
  83.                     check the font common dialog for spellings.
  84.     nFontSize%: font size to apply to all objects. If value is 0, then
  85.               font size is not modified. Fontsize is modified even if
  86.               facename is not modified or facename generates an error.
  87.     lpErrcode%: programmer defined codes.
  88.  
  89.  
  90. Error codes returned from XTALUDL.DLL:
  91.  
  92.   All sub's:
  93.     0: No errors detected.
  94.     32000 : Not a Crystal Report (or a version not supported).
  95.     32001 : Bad path or file name. Couldn't get handle to file.
  96.  
  97.   GetSetLabelDimensions:
  98.     32002 : No margin info. Can't set, or nothing to get.
  99.     32003 : No label info. Can't set, or nothing to get.
  100.  
  101.   SetFontAll:
  102.     32010 : Couldn't set fontface: no printer in WIN.INI or couldn't get
  103.             a device context for printer, or invalid facename passed.
  104.  
  105.  
  106. XTALUDL.DLL was designed with Microsoft Visual C++ 1.00.
  107.  
  108.  
  109. Robert J. Johnston
  110. Compuserve: 71611, 1370
  111.  
  112.