Screen Resolution

Zuurbier, E. - AMSXE Erik.Zuurbier@KLM.NL
Fri, 23 Apr 1999 13:48:43 +0200


I found something else:

module Test
import StdEnv, intrface
Start = (WinGetHorzResolution,WinGetVertResolution)

This test program answers (96,96). Obviously not the number of pixels
of the whole screen. So let's dig deeper.

deltaSystem.icl also contains
InchToHorPixels :: !Real -> Int
InchToHorPixels inch = toInt ( inch * toReal WinGetHorzResolution)

InchToVerPixels :: !Real -> Int
InchToVerPixels inch = toInt ( inch * toReal WinGetHorzResolution)

(the last line is probably wrong, as it mixes up horizontal and vertical)

These functions show that 96 is the number of pixels per inch.
If that is good enough, there you are.

Erik Zuurbier

> Dears Programmers:
> 
> I'm looking for a function capable to return the screen resolution that
> is been used. I found a function called "OSScreenResolution" in
> OSKERNEL.DCL, in the OsIO directory. I tried to use it but fail every
> time. This is my program test:
> 
> module test
> import oskernel
> Start = OSScreenResolution 0
> 
> 
> and the message error is: 
> 
> 	"error L2029: 'OSScreenResolution' : unresolved external"
> 
> What does that mean? How can I use it? Is that the correct function to
> be used?
> My CLEAN is an OS/2 version. I used the compilation option: 
> 
> 			"clm -p -sl -d test"
> 
> I'm very thankful for help.
> 
> Paulo.
>