The SYSTEM object - some new properties

Published 22 OCT 2012 at 07:30:34AM

Updated on 22 NOV 2012 at 07:30:34AM

As the project moves along and work progresses you should see many new items added to the object interfaces in the Presentation Server. One of the main reasons for this is to try and reduce the amount of times you as a developer have to call the Windows API directly - we realize that most OI programmers aren't C programmers and so we're trying to save you the pain of dealing with static data types, C-structures and pointers wherever possible.

In light of this we've made some changes to the SYSTEM object: As well as bringing across many of the existing Utility services (mentioned previously here) there's also some brand-new properties and methods too (and we're not finished yet).

Here's a quick look at some of the new SYSTEM properties we've added so far:

DPI property

This property returns the Windows DPI setting (96, 120 or 144) so you can handle custom scaling in your app if it's running at a different DPI than the system you designed it on.

ENVVARLIST property

This property returns a list of OS environment variables (just as if you'd typed "set" at the DOS command prompt).

FONTLIST property

This property returns a list of font names that are available on the system.

INTERACTIVE property

This property returns TRUE$ if OpenInsight has been launched in an interactive Windows session (i.e. it has a "desktop").  It returns FALSE$ if OpenInsight has been launched in a non-interactive session such as from a Windows Service process.

MONITORLIST property

This property returns a dynamic array of monitor information.  Each field in the array contains the following details for each monitor:

  • Monitor Handle
  • Monitor rectangle (left, top, right, bottom)
  • Monitor work area (left, top, right, bottom)
  • Flags
  • Device name.

TYPES property

This property returns a list of the object types that the Presentation Server supports (EDITBOX, LISTBOX, WINDOW and so on).  We'll cover this in more detail in a later post when we look at some of the properties that expose an object's type-information to provide a "reflection" interface for the toolset.

That's just a few of the new additions - we'll post more as they appear.  If there's any others you think should be added please leave a comment and tell us.

Comments

Original ID: revdevx.wordpress.com/?p=81
  • third_party_content/community/commentary/revdevx/16367.3128935185.txt
  • Last modified: 2024/01/29 20:23
  • by 127.0.0.1