Skip to content

View Print

Paul Squires edited this page Oct 19, 2026 · 2 revisions

Home › Console Functions › View Print

View Print

Limits printing and scrolling to a range of rows, or to the whole screen again.

Syntax

View Print [ firstrow To lastrow ]

Parameters

  • firstrow
  • lastrow

Description

Sets the boundaries of the text printing area on the screen (in console mode or in graphics mode) to the lines starting at first up to and including last (the number of the available text lines on the screen depends on the screen mode). Text lines are counted starting with 1. The text cursor is moved to the beginning of the first line specified.
If the row numbers are omitted, the entire screen is used as the text printing area.

Remarks

Differences from QB

  • None.

See also

Examples

Cls

View Print 5 To 6

Color , 1

'' clear only View Print area

Cls

View Print can be used in graphics mode to avoid the text output overwriting graphics:

Screen 12

Dim As Integer R,Y,x,y1

Dim As Single y2

View Print 20 To 27

Line (0,0)-(639,300),1,BF

Line (100,50)-(540,200),0,BF

Do

 r = (r + 1) And 15

 For y = 1 To 99

   y1 = ((1190 \ y + r) And 15)

   y2 = 6 / y

   For x = 100 To 540

    PSet (x, y + 100), CInt((319 - x) * y2) And 15 Xor y1

  Next x,y

 If r=0 Then Color Int(Rnd*16): Print "blah"

Loop Until Len(Inkey)

Category: Console Functions
Kind: keyword


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally