Since QB64pe has declared full functional QB45 compatible I have posted this snippet:
The QB45 contains Width with Device$
Where:
The QB45 contains Width with Device$
Code: (Select All)
' sample program to set Width statements.
Dim screenwidth As Integer
Dim screenheigth As Integer
Dim widthx As Integer
widthx = 80
screenwidth = 80
screenheight = 25
' reset file width
filenumber = FreeFile
Open "tempfile.xyz" For Output As #filenumber
Width #filenumber, widthx
' reset some printers
Width "lpt1:", widthx
Width "lpt2:", widthx
Width "lpt3:", widthx
' resets some drvies
Width "cons:", widthx
Width "scrn:", widthx
' reset lprint
Width LPrint widthx
' reset screen
'PRINT screenwidth, screenheight
Width screenwidth, screenheight
End
Where:
Code: (Select All)
WIDTH Statement Details
Syntax
WIDTH [columns][,lines]
WIDTH {#filenumber | device},width
WIDTH LPRINT width
Both files and devices can be assigned an output-line width.
Syntax Description
WIDTH [columns][,lines] Sets the number of columns and lines to
display on the screen.
The value of columns must be either 40 or
80. The default value is 80.
The value of lines may be 25, 30, 43, 50,
or 60, depending on the display adapter
used and the screen mode (see the SCREEN
statement help topic for more information).
The number of lines displayed when the program
started will determine the default value.
WIDTH #filenumber,width Sets the line width of an output device opened
as a file (for example, LPT1: or CONS:).
The filenumber argument is the number
associated with the file in the OPEN
statement.
This form permits altering the width while
a file is open, since the statement takes
place immediately.
WIDTH device,width Sets the line width of device (a device file
name).
The device should be a string expression
(for example, "CONS:").
Note that this width assignment is deferred
until the next OPEN statement affecting the
device; the assignment does not affect output
for an already open file.
WIDTH LPRINT width Sets to width the line width of the line
printer, for use by subsequent LPRINT
statements.