VisMeter
Namespace: PPJ.Runtime.Vis
Assembly: PPJ.Runtime.Vis.50 (5.0.0.0)
Displays progress using the native Windows progress-bar control.
- C#
- VB.NET
public class VisMeter : SalCustomControl
Public Class VisMeter
Inherits SalCustomControl
Example:
using (var meter = new PPJ.Runtime.Vis.VisMeter())
{
meter.Minimum = 0;
meter.Maximum = 100;
meter.Value = 50;
}
Constructors
VisMeter()
Initializes a native progress bar with a range of 0 through 100 and a value of zero.
Properties
HScroll
Boolean: Gets the base horizontal-scroll setting. (Default: False)
Assignments are ignored.
MarqueeAnimationSpeed
Int32: Gets or sets the native marquee animation interval. (Default: 100)
Negative values cause ArgumentOutOfRangeException.
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.
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.
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.
Style
ProgressBarStyle: Gets or sets the progress display style. (Default: 0)
A change recreates the native handle and updates marquee animation.
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.
VScroll
Boolean: Gets the compatibility vertical-scroll setting. (Default: False)
Assignments are ignored.
WindowsClassName
String: Gets the native progress-bar class name. (Default: "")
Assignments are ignored.
WindowsDLLName
String: Gets the underlying native control library name. (Default: "")
Assignments are ignored.
WindowsExStyle
Int32: Gets the extended native style flags for meter mirroring. (Default: 0)
Assignments are ignored.
WindowsStyle
Int32: Gets the native style flags required by the selected progress style. (Default: 0)
Assignments are ignored.
Methods
CreateHandle()
Initializes Windows common controls when needed, then creates the base native handle.
FromHandle(handle)
Resolves a progress meter from a native window handle.
| Parameter | Type | Description |
|---|---|---|
| handle | SalWindowHandle | The 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.
OnBackColorChanged(e)
Raises the base event and updates the native background color when a handle exists.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The color-change event data. |
OnForeColorChanged(e)
Raises the base event and updates the native progress color when a handle exists.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The color-change event data. |
OnHandleCreated(e)
Raises the base event and applies the stored range, value, colors, and marquee settings.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The handle-creation event data. |
SetProgress(nPercent)
Sets the progress value after clamping it to the current minimum and maximum.
| Parameter | Type | Description |
|---|---|---|
| nPercent | SalNumber | The requested progress value, expressed in the control's range units. |
Returns: SalNumber. Always zero.
Implements
| Name | Description |
|---|---|
| ISalWindow |