Remarks fields for printing the database

xiaoxiao2021-03-06  48

* Function Name: Memoprn

* Function Description: Remarks fields for printing the database

* Usage Description: Memoprn (,,)

* Memofld: Remarks Field Name Col: Print Starting Column Width: Printing Wide

* Calling example: use dbfname

* = Memoprg (FieldName, 1,40)

* Return

* ------------------------------------------------- ------------

Function Memoprn

Parameters Memofld, Col, Width

Private Check, Memofld, Col, Width

* - Store the status of the original Memowidth, Printer

Cur_width = set ("memowidth")

CUR_PRINT = IIF (Set ("Printer") = "on",. t.,. f.)

NewWidth = min (_rmargin- _lmargin, width)

Set memowidth to newwidth

Define Box from Col-1 To (Col NewWidth 1) Height Memlines ((Memofld)) 2

Do While! PrintStatus ()

Wait "printer is not a single-machine state, please check and press any one to continue or press ESC to exit";

Window Nowait

If LastKey () = 27

SET MEMOWIDTH TO CUR_WIDTH && Recovery Settings

IF Cur_Print

Set Printer Off

ENDIF

Return

ENDIF

Enddo

Set printer on

STORE.T. TO BOX

* - Print the border set by the Define Box, the system memory variable Box needs to be set to .t.

?? (Memofld) at col

STORE .f. To box

* - @ COL, 1 Say (Memofld)

Set Memowidth to Cur_WIDTH

IF Cur_Print

Set Printer Off

ENDIF

Return

转载请注明原文地址:https://www.9cbs.com/read-117489.html

New Post(0)