HARDCOPY

Concept Link IconSee also Concept Link IconExample

Initiates a hard copy of the desktop client screen on the Windows default printer or clears its print jobs.

WebVue support - Not applicable. Returns an unsuccessful code if used in this context.

Mode

Mnemonic

Syntax

1 SCREEN 1
2 OPTION 2
4 PREVIOUSWINDOW 1
6DELALL1
7DESKTOP1

Syntax 1

IVAL = HARDCOPY (Mode);

Execution

Mode

Mnemonic

Action

1

SCREEN

Print a hard copy of the entire screen on the Windows default printer.

4

PREVIOUSWINDOW

Print a hard copy of the window that previously had focus, on the default printer. The window must still be open.

6DELALLCancel and clear all print jobs in the default printer’s spooler.
7DESKTOPPrint the entire desktop when using a multi-region / multi-screen system.
  Return: 1 if successful, else 0.

The behavior of HARDCOPY can be affected by the operating system, in particular because of printer driver and printer configuration.

Syntax 2

IVAL = HARDCOPY (Mode, Sub-mode, Value);

Argument

Meaning

Sub-mode

Print according to Value.

1 Size:

1 Fit to page.

2 Use whole page.

3 Use scaling factors.

2 Apply scaling to the X axis.

3 Apply scaling to the Y axis.

4 Print via the named spooler.

5 Apply name to the printer dialog.

6 Message.

7 Exit.

8 Text for percentage, from 0 to 100.

9 Text for the Cancel button.

ValueAs used in the printing actions above. Type STR.

Execution

Mode

Mnemonic

Action

2

OPTION

Print a hard copy of the entire screen on the Windows default printer according to the sub-mode.

 

 

Return: 1 if successful, else 0.

The embedded Hardcopy program

 PcVue also has a built-in program known as Hardcopy. It is called from the Run.Program animation. The program does not appear in the Program Management window.

The embedded Hardcopy program has two functions:

  • SCREEN – prints the entire screen.
  • PREVIOUSWINDOW – prints only the most recently active window.

Running Hardcopy from the Macro animation

The Hardcopy instruction is also supported by the Macro animation.

Example

HARDCOPY("OPTION",1,3); 'scaling factors

HARDCOPY("OPTION",2,2); 'reduce to 50% on X axis

HARDCOPY("OPTION",3,2); 'reduce to 50% on Y axis

HARDCOPY("OPTION",5,"Color copy"); 'the dialog name

HARDCOPY("OPTION",6,"Copy in progress"); 'a message

HARDCOPY("OPTION",9,"Stop"); 'text for button

HARDCOPY("SCREEN"); 'print current screen

HARDCOPY("DELALL"); 'cancel print jobs

For a further example, select the Example link above.