Output Command

Purpose

Redirects the output to a Form or Printer object.

Syntax

Output = object

object:Form or Printer

Description

With Output the output from GFA-BASIC 32 graphic commands is redirected. The output can be redirected to a Printer object or to a Form object. The output can also be temporarily redirected to a Form which isn't currently active, for instance, to draw in the client area of a non-active window.

Example

Dim bmp As Picture

// please choose and set a file with path

Local d$ = Left(ProgName$, RInStr(ProgName$, "\")) & "gfawintb.bmp", h As Handle

Set bmp = LoadPicture(d$)

// to choose a printer and switch output

Dlg Print Me, 0, h

If h <> 0

SetPrinterHDC h

Output = Printer

Printer.StartDoc "Test"

Printer.StartPage

Printer.PaintPicture bmp, 0, 0

Printer.EndPage

Printer.EndDoc

EndIf

Remarks

Set Me returns the output to a Form.

See Also

Me, Form, Printer

{Created by Sjouke Hamstra; Last updated: 21/10/2014 by James Gaite}