xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

MaxRow()

Determines the bottom row position of the screen buffer.

Syntax

MaxRow() --> nRow

Return

The function returns the ordinal position of the bottom row in a console window as a numeric value.

Description

MaxRow() determines the maximum number of rows in a console window in which characters can be displayed. The top row has number zero, the bottom row has number MaxRow().

Info

See also:Col(), MaxCol(), Row(), SetMode()
Category: Screen functions
Source:rtl\maxrow.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The function changes the screen buffer, or console window size,
// and displays the size of the screen buffer.

   PROCEDURE Main
      LOCAL nRow := MaxRow(), nCol := MaxCol()
      CLS

      SetMode( 25, 80 )
      ? MaxRow(), MaxCol(), ScreenBufferSize()
      WAIT

      SetMode( 50, 80 )
      ? MaxRow(), MaxCol(), ScreenBufferSize()
      WAIT

      SetMode( 50, 135 )
      ? MaxRow(), MaxCol(), ScreenBufferSize()
      WAIT

      SetMode( nRow+1, nCol+1 )
   RETURN

   FUNCTION ScreenBufferSize
   RETURN 2 * ( 1 + MaxRow() ) * ( 1 + MaxCol() )

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe