Skip to main content

VisMeter

Namespace: PPJ.Runtime.Vis

Assembly: PPJ.Runtime.Vis.50 (5.0.0.0)

Displays progress using the native Windows progress-bar control.

public class VisMeter : SalCustomControl

Example:

using (var meter = new PPJ.Runtime.Vis.VisMeter())
{
meter.Minimum = 0;
meter.Maximum = 100;
meter.Value = 50;
}

Constructors

Instance member VisMeter()

Initializes a native progress bar with a range of 0 through 100 and a value of zero.

Properties

Instance member HScroll

Boolean: Gets the base horizontal-scroll setting. (Default: False)

Assignments are ignored.

Instance member MarqueeAnimationSpeed

Int32: Gets or sets the native marquee animation interval. (Default: 100)

Negative values cause ArgumentOutOfRangeException.

Instance member Maximum

Int32: Gets or sets the stored maximum progress value. (Default: 100)

Negative values become zero; the stored minimum and value are lowered if necessary. An existing handle receives the old maximum during this setter, before the new maximum is stored.

Instance member Minimum

Int32: Gets or sets the stored minimum progress value. (Default: 0)

Negative values become zero; the stored maximum and value are raised if necessary. An existing handle receives the old minimum during this setter, before the new minimum is stored.

Instance member RightToLeftLayout

Boolean: Gets or sets whether right-to-left layout mirrors the meter.

Until assigned, the getter uses the containing form setting. Changing the effective value recreates the native handle.

Instance member Style

ProgressBarStyle: Gets or sets the progress display style. (Default: 0)

A change recreates the native handle and updates marquee animation.

Instance member Value

Int32: Gets or sets the stored progress value. (Default: 0)

The setter sends the value to an existing handle without clamping the stored value.

Instance member VScroll

Boolean: Gets the compatibility vertical-scroll setting. (Default: False)

Assignments are ignored.

Instance member WindowsClassName

String: Gets the native progress-bar class name. (Default: "")

Assignments are ignored.

Instance member WindowsDLLName

String: Gets the underlying native control library name. (Default: "")

Assignments are ignored.

Instance member WindowsExStyle

Int32: Gets the extended native style flags for meter mirroring. (Default: 0)

Assignments are ignored.

Instance member WindowsStyle

Int32: Gets the native style flags required by the selected progress style. (Default: 0)

Assignments are ignored.

Methods

Protected member CreateHandle()

Initializes Windows common controls when needed, then creates the base native handle.

Static member FromHandle(handle)

Resolves a progress meter from a native window handle.

ParameterTypeDescription
handleSalWindowHandleThe native control handle.

Returns: VisMeter. The associated VisMeter, or null when no managed control owns the handle.

A handle belonging to another control type causes an InvalidCastException.

Protected member OnBackColorChanged(e)

Raises the base event and updates the native background color when a handle exists.

ParameterTypeDescription
eEventArgsThe color-change event data.

Protected member OnForeColorChanged(e)

Raises the base event and updates the native progress color when a handle exists.

ParameterTypeDescription
eEventArgsThe color-change event data.

Protected member OnHandleCreated(e)

Raises the base event and applies the stored range, value, colors, and marquee settings.

ParameterTypeDescription
eEventArgsThe handle-creation event data.

Instance member SetProgress(nPercent)

Sets the progress value after clamping it to the current minimum and maximum.

ParameterTypeDescription
nPercentSalNumberThe requested progress value, expressed in the control's range units.

Returns: SalNumber. Always zero.

Implements

NameDescription
ISalWindow