The SYSTEM object – some new properties

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.

2 thoughts on “The SYSTEM object – some new properties

  1. Pingback: The LOG_EVENT method | Building OpenInsight 10

  2. Pingback: The IDLEPROC Queue | Building OpenInsight 10

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s