ctl32_progressbar: overview
Overview
This visual class provides a progressbar control that can be used in VFP9. This class uses the Windows API to create a true Windows Common Controls Progress Bar.
Class Hierarchy
ctl32
ctl32_controlbase
ctl32_progressbar
ctl32_controlbase
ctl32_progressbar
The ProgressBar control indicates the progress of a process by displaying an appropriate number of rectangles arranged in a horizontal bar. When the process is complete, the bar is filled. Progress bars are commonly used to give the user an idea of how long to wait for a process to complete; for instance, when a large file is being loaded.
The key properties of the ProgressBar control are ctlValue, ctlMinimum, and ctlMaximum. The ctlMinimum and ctlMaximum properties set the maximum and minimum values the progress bar can display. The ctlValue property represents the progress that has been made toward completing the operation. Because the bar displayed in the control is composed of blocks, the value displayed by the ProgressBar control only approximates the ctlValue property's current value. Based on the size of the ProgressBar control, the ctlValue property determines when to display the next block.
The most common way to update the current progress value is to write code to set the ctlValue property. In the example of loading a large file, you might set the maximum to the size of the file in kilobytes. For example, if the ctlMaximum property is set to 100, the ctlMinimum property is set to 10, and the ctlValue property is set to 50, 5 rectangles will be displayed. This is half of the number that can be displayed.
However, there are other ways to modify the value displayed by the ProgressBar control, aside from setting the ctlValue property directly. The ctlStep property can be used to specify a value to increment the ctlValue property by. Then, calling the ctlPerformStep method will increment the value. To vary the increment value, you can use the ctlIncrement method and specify a value with which to increment the ctlValue property.
Properties, Methods and Events
ctlAutoSize | Gets or sets a value indicating whether the height and/or width of the control is automatically sized. | |||
ctlBackColor | Gets or sets the background color of the control. | |||
ctlBackgroundImage | Gets or sets the background image displayed in the control. | |||
ctlBackgroundImageLayout | Gets or sets the background image layout. | |||
ctlBarColor | DEPRECATED. Replaced by the .NET equivalent ctlForeColor property. | |||
ctlBorderColor | Gets or sets the border color of the control. | |||
ctlBottom | Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area. | |||
ctlCaption | DEPRECATED. | |||
ctlControlSource | Specifies the source of data to which an object is bound. | |||
ctlCreateControl | Forces the creation of the control, including the creation of the handle and any child controls. | |||
ctlCreated | Gets a value indicating whether the control has been created. | |||
ctlDefaultBackColor | Gets the default background color of the control. | |||
ctlDefaultBorderColor | Gets the default border color of the control. | |||
ctlDefaultForeColor | Gets the default foreground color of the control. | |||
ctlDispose | Releases all resources used by the control. | |||
ctlForecolor | Gets or sets the foreground color of the control. | |||
ctlFormat | DEPRECATED. | |||
ctlHandle | Gets the window handle that the control is bound to. | |||
ctlHide | Conceals the control from the user. | |||
ctlHostFormhWnd | Gets the window handle of the inner window of the parent form. | |||
ctlHosthWnd | Gets the windows handle of the parent object of this control, if there is one. | |||
ctlhWnd | DEPRECATED. Replaced by the .NET equivalent ctlHandle property. | |||
ctlIncrement | Advances the current position of the progress bar by the specified amount. | |||
ctlIsHandleCreated | Gets a value indicating whether the control has a handle associated with it. | |||
ctlLocationLeft | Gets the Left coordinate of the upper-left corner of the control relative to the upper-left corner of its container. (ObjToClient) | |||
ctlLocationTop | Gets the Top coordinate of the upper-left corner of the control relative to the upper-left corner of its container. (ObjToClient) | |||
ctlMarquee | Indicates progress by continuously scrolling a block across a ProgressBar in a marquee fashion. | |||
ctlMarqueeAnimationSpeed | Gets or sets the time period, in milliseconds, that it takes the progress block to scroll across the progress bar. | |||
ctlMarqueeSpeed | DEPRECATED. Replaced by the .NET equivalent ctlMarqueeAnimationSpeed property. | |||
ctlMaximum | Gets or sets the maximum value of the range of the control. | |||
ctlMaximumBytes | Gets the Maximum value as a string formatted in Bytes/MB/GB/TB. | |||
ctlMinimum | Gets or sets the minimum value of the range of the control. | |||
ctlMinimumBytes | Gets the Minimum value as a string formatted in Bytes/MB/GB/TB. | |||
ctlOrientation | Gets or sets a value indicating the horizontal or vertical orientation of the control. | |||
ctlPercent | Gets a value representing a percent of Value vs Maximum - Minimum | |||
ctlPerformStep | Advances the current position of the progress bar by the amount of the ctlStep property. | |||
ctlPlay | Specifies if the progress bar should increment its value automatically. | |||
ctlRecreatingHandle | Gets a value indicating whether the control is currently re-creating its handle. | |||
ctlRefresh | Forces the control to invalidate its client area and immediately redraw itself and any child controls. | |||
ctlRepeat | DEPRECATED. | |||
ctlReset | Resets the Value property to ctlMinimum or to ctlMaximum with an optional parameter. | |||
ctlResetBackColor | Resets the ctlBackColor property to its default value. | |||
ctlResetBorderColor | Resets the ctlBorderColor property to its default value. | |||
ctlResetFont | Resets the ctlFont... properties to its default values. | |||
ctlResetForeColor | Resets the ctlForeColor property to its default value. | |||
ctlRight | Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area. | |||
ctlShow | Displays the control to the user. Showing the control is equivalent to setting the ctlVisible property to true. | |||
ctlSizeAdjust | DEPRECATED. Replaced by the .NET equivalent ctlAutoSize property. | |||
ctlSmooth | Specifies if the bar will be shown as one continous block, or as a group of small individual blocks. | |||
ctlState | VISTA. Sets the state of the progress bar: Normal, Error or Paused. | |||
ctlStep | Gets or sets the amount by which the ctlPerformStep or ctlStepIt methods increase the current position of the progress bar. | |||
ctlStepIt | Increments the value of the control by the amount specified in ctlStep. | |||
ctlStyle | NOT LIKE THE .NET equivalent PROPERTY. Specifies the style of the progress bar border. | |||
ctlThemes | Specifies if themes are used for the control. | |||
ctlValue | Specifies the current value or state of the control. | |||
ctlValueBytes | Gets the current value as a string formatted in Bytes/MB/GB/TB. | |||
ctlValueChanged | Occurs when the ctlValue property changes. | |||
ctlValuePercent | Returns a character string of the current ctlPercent value formatted with a % sign. | |||
ctlVertical | DEPRECATED. Replaced by the .NET equivalent ctlOrientation property. | |||
ctlVisible | Gets or sets a value indicating whether the control is displayed. |
Progressbar Themes disabled, like Office 2003 Install progressbar.
Hi,
ReplyDeleteHow to display value string a on the progressbar?