DSTAT and Screen Size


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Robert G Laurin on August 01, 2013 at 18:00:29:

Using Comet32

17th byte of DSTAT(TERM$) returns current screen width.

If we do a (SCREEN=102,27) then SUB(DSTAT(TERM$),17,1) will return '@66@' (102)

If we open a First Window, DSTAT will still return @66@

If we open a Second Window, DSTAT will still return @66@

However,

When we close the Second Window, DSTAT will now return the width of the First Window.

When we close the First Window, DSTAT will return the Parent Window width of @66@.

Looks like closing a Window reset the DSTAT 17th Byte to the previous Window, not the Parent Window. Whereas Opening a Windows does not affect DSTAT.

I think the DSTAT should always return the Parent Window size because that is the limit of any Child Window we can open.

Talking of limit... How do we get the screen height? (Number of Rows)

In this example, my HELP program knows the screen is 102 wide but has no clues how many rows can be used. And since HELP can be re-use in any program, the screen size will vary from one to another.

In an ideal world, DSTAT should return the Parent Window size (columns & row), the number of Child Window and maybe even the Child Window size and/or Window coordinates.

This was tested on Comet32 2013.474 on Windows 7.
Was NOT verified with Comet 16.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]