Tag Archives: Taskbar

Progress Bar controls

One of the new controls supported by OpenInsight 10 is the Windows Progress Bar control which is used to display the progress of lengthy operations.

Progress Bar

Windows 7 Aero Progress Bar

Windows XP Progress Bar

Windows XP Progress Bar

It is a fairly simple control and supports the following properties:

  • BORDER
  • ERRORCOLOR
  • MARQUEE
  • NORMALCOLOR
  • PAUSEDCOLOR
  • RANGE
  • SHOWTEXT
  • SMOOTH
  • STATE
  • STEP
  • SYNCTASKBAR
  • TEXT
  • TRANSLUCENCY
  • VALUE
  • VERTICAL

And the following methods:

  • DECREMENT
  • INCREMENT

BORDER property

Setting this boolean property to TRUE (“1”) draws a border around the control.  This is the default value.

XP Progress Bar without border

Translucent XP Progress Bar without a border

ERRORCOLOR property

This property is a standard color value and sets the color of the bar when it is in the “error” state (see the STATE property below).  Depending on the visual style in use this property normally defaults to a red color.

Red Progress Bar

Windows Classic smooth style Progress Bar with an ERRORCOLOR of 255 (red)

MARQUEE property

This property is an integer value that contains the time in milliseconds between marquee animation updates.  Setting it to 0 stops the marquee animation.

Progress Bar with marquee effect

Aero Progress Bar with a MARQUEE property of 50 (i.e. it animates every 50 ms)

XP Progress Bar with marquee effect

Windows XP Progress Bar with a MARQUEE property of 50

NORMALCOLOR property

This property is a standard color value and sets the color of the bar when it is in the “normal” state (see the STATE property below).  Depending on the visual style in use this property normally defaults to a green color, though in other schemes like “XP Olive” this defaults to an orange color instead.

Purple Progress Bar

Windows 7 Aero progress Bar with a purple NORMALCOLOR (255,0,255)

PAUSEDCOLOR property

This property is a standard color value and sets the color of the bar when it is in the “paused” state (see the STATE property below).  Depending on the visual style in use this property normally defaults to an amber or yellow color.

Windows 7 Aero paused progress bar

Windows 7 Aero segmented Progress Bar with a STATE of “3” (paused)

RANGE property

This property is an @fm-delimited array of two integers containing the upper and lower limits of the progress bar.

<1> Low limit
<2> High Limit

The VALUE property must be between these two values.

SHOWTEXT property

Setting this property to TRUE (“1”) will display the contents of the TEXT property in the center of the progress bar.  The default is FALSE ( “0”).

SMOOTH property

Setting this property to TRUE (“1”) causes the progress indicator to be drawn as a continuous bar rather than in the usual segmented style.

Smooth Progress Bar

Windows Classic Smooth Progress Bar – i.e. a SMOOTH style of TRUE (“1”)

Segmented Progress Bar

Windows 7 Aero segmented Progress Bar – i.e. a SMOOTH style of FALSE (“0”)

STATE property

This property sets the visual state of the progress bar.  It can be one of the following values:

  • “1” – Normal (green)
  • “2” – Error (red)
  • “3” – Paused (yellow)

Each of these states has a default color as indicated above but this can be changed by one of the bar color properties (NORMALCOLOR, ERRORCOLOR and PAUSEDCOLOR).

Examples:

Progress Bar Error

Windows 7 Aero Progress bar with a STATE property of 2

Progress Bar Paused

Windows 7 Aero Progress bar with a STATE property of 3

STEP property

This property is a simple integer and is used in conjunction with the INCREMENT method.  If the latter is called with no value the progress bar is incremented by the amount specified in this property.

SYNCTASKBAR property

When set to TRUE (“1”) the parent form’s taskbar button is automatically updated to mirror the state of the Progress Bar control (as per our previous post on Taskbar Integration).

Synchronized Progress Bar

Windows 7 Aero Progress Bar with SYNCTASKBAR set to TRUE (“1”)

This property has no effect unless the application is running on Windows 7 or higher.

TEXT property

This property is the same as the standard TEXT property.  However, any occurrences of the substring “%p%” within the text will be replaced with the current percentage complete.

Progress Bar with TEXT

Windows 7 Aero Progress Bar with a TEXT property of “%p% Complete”

TRANSLUCENCY property

This property specifies the transparency of the control’s background (i.e. the progress bar itself is not affected).  It is based on simple percentage amount, “0″ being fully opaque and “100″ being fully transparent (and therefore not visible).

Translucent Progress Bar

Windows 7 Aero Progress Bar with a TRANSLUCENCY of 50

VALUE property

This simple integer property sets the current value (position) of the progress bar.  It should be a value between the limits set by the RANGE property.

Progress Bar 25% complete

Windows 7 Aero Progress Bar with a RANGE of [0,200] and a VALUE of 50

VERTICAL property

Setting this property to TRUE (“1”) draws the progress bar in a vertical fashion – i.e. it increments from the bottom to the top.

Vertical Progress Bar

Windows 7 Aero Progress Bar with a VERTICAL property of TRUE (“1”)

DECREMENT method

exec_Method( ctrlEntID, "DECREMENT", amount )

This method decrements the progress bar by a specified amount.  If no amount is specified the bar is decremented by the value contained in the STEP property instead.

INCREMENT method

exec_Method( ctrlEntID, "INCREMENT", amount )

This method increments the progress bar by a specified amount.  If no amount is specified the bar is incremented by the value contained in the STEP property instead.

Further reading

More information on Progress Bars can be found on the MSDN site here, along with some user interface guidelines here.

(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).

Taskbar Integration – Progress Bars

One of the most useful features introduced with the Windows 7 taskbar was the ability to display progress information directly on your form’s taskbar button.  OpenInsight 10 exposes this functionality via two new WINDOW properties:

  • PROGRESSVALUE
  • PROGRESSSTATE

PROGRESSVALUE Property

This is a simple @fm-delimited array composed of two fields that contain the current progress value (i.e. the proportion complete) and the maximum progress value (i.e. the value when completed).

Example:

Progress Bar 50% complete

PROGRESSVALUE of 50,100

Note that this property is set-only.

PROGRESSSTATE Property

This property specifies the appearance of the progress bar. It can be one of the following values:

  • “0” – No progress Information
  • “1” – Normal (green)
  • “2” – Error (red)
  • “3” – Paused (yellow)
  • “4” – Indeterminate (this results in a marquee-style effect)

Example:

Progress Bar Error

PROGRESSSTATE of 2

Progress Bar Paused

PROGRESSSTATE of 3

Note that this property is set-only.

Further reading

More information on taskbar Progress Bars can be found here, along with some guidelines on their usage here.

(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).

Taskbar Integration – Overlay Icons

We have already looked at the TASKBARID property in an earlier posting but there are also several other properties that allow your OI forms to integrate closely with the taskbar via such items as overlay icons and progress bars.  In this post we’ll take a quick look at the new OVERLAYICON property.

OVERLAYICON property

This property allows you to specify an icon that will be superimposed onto the bottom right of your form’s taskbar button.  It is designed to highlight a status change in your program and is used by applications such as MSN Messenger to denote the user’s online status.

This property is similar to the standard ICON property where you simply specify the name and path of an icon file, or it’s DLL resource ID.

Example:

Form without an overlay icon

Form without an overlay icon

Form with an overlay icon

Form with an overlay icon

Further reading

More information on Overlay Icons can be found here, along with some guidelines on their usage here.

(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).

Taskbar Integration – The TASKBARID property

In a previous post on the RXI files we mentioned the taskBarID switch that could be applied when launching the Presentation Server to un-group instances of the same executable on the Windows Taskbar.  This same principle can also be applied to top-level application windows so they can have their own icon on the taskbar rather than being grouped together with other application windows owned by the same instance.

To support this feature OpenInsight 10 provides a new WINDOW property called TASKBARID, which should contains a unique value that differentiates the window from other windows running on the desktop.

For example, a fairly easy way to set a unique value would be to combine the window ID and handle like so:

taskBarID = @window : "." : get_Property( @window, "HANDLE" )
call set_Property( @window, "TASKBARID", taskBarID )

Here is an example of a window with a blank TASKBAR property – notice that it is grouped with the System Monitor window as they both belong to the same instance of OpenInsight:

TASKBARID not set

TASKBARID not set

Here is the same window with the TASKBARID set to “TEST” – the OpenInsight 10 window icon is now visible on the TaskBar:

TASKBARID set to “TEST”

TASKBARID set to “TEST”

Note that you can also give multiple windows the same TASKBARID if you wish to control how they are grouped together.

[Edit: 01 Feb 13 – property renamed to TASKBARID]

(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).