Ctl32 ProgressBar

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

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

ctlAutoSizeGets or sets a value indicating whether the height and/or width of the control is automatically sized.
ctlBackColorGets or sets the background color of the control.
ctlBackgroundImageGets or sets the background image displayed in the control.
ctlBackgroundImageLayoutGets or sets the background image layout.
ctlBackStyleSpecifies if the background of an object is transparent or opaque.

ctlBarColorDEPRECATED. Replaced by the .NET equivalent ctlForeColor property.
ctlBorderColorGets or sets the border color of the control.
ctlBottomGets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.
ctlCanFocusSpecifies whether the control can receive focus.

ctlCaptionDEPRECATED.
ctlControlSourceSpecifies the source of data to which an object is bound.
ctlCreateControlForces the creation of the control, including the creation of the handle and any child controls.
ctlCreatedGets a value indicating whether the control has been created.
ctlDefaultBackColorGets the default background color of the control.
ctlDefaultBorderColorGets the default border color of the control.
ctlDefaultForeColorGets the default foreground color of the control.
ctlDefaultHeightGets the default height of the control.
ctlDefaultWidthGets the default width of the control.
ctlDisposeReleases all resources used by the control.
ctlEnabledGets or sets a value indicating whether the control can respond to user interaction.
ctlFocusedGets a value indicating whether the control has input focus.
ctlFontBoldSpecifies if the text is bold.
ctlFontCharsetSpecifies the character set, or language script, of the font.
ctlFontItalicSpecifies if the text is italic.
ctlFontNameSpecifies the name of the font.
ctlFontSizeSpecifies the size in points of the font.
ctlFontStrikethruSpecifies if the text is strikethru.
ctlFontUnderlineSpecifies if the text is underline.
ctlForecolorGets or sets the foreground color of the control.

ctlFormatDEPRECATED.
ctlHandleGets the window handle that the control is bound to.
ctlHideConceals the control from the user.
ctlHostFormhWndGets the window handle of the inner window of the parent form.
ctlHosthWndGets the windows handle of the parent object of this control, if there is one.
ctlhWndDEPRECATED. Replaced by the .NET equivalent ctlHandle property.

ctlIncrementAdvances the current position of the progress bar by the specified amount.
ctlIsHandleCreatedGets a value indicating whether the control has a handle associated with it.
ctlLocationLeftGets the Left coordinate of the upper-left corner of the control relative to the upper-left corner of its container. (ObjToClient)
ctlLocationTopGets the Top coordinate of the upper-left corner of the control relative to the upper-left corner of its container. (ObjToClient)

ctlMarqueeIndicates progress by continuously scrolling a block across a ProgressBar in a marquee fashion.

ctlMarqueeAnimationSpeedGets or sets the time period, in milliseconds, that it takes the progress block to scroll across the progress bar.

ctlMarqueeSpeedDEPRECATED. Replaced by the .NET equivalent ctlMarqueeAnimationSpeed property.

ctlMaximumGets or sets the maximum value of the range of the control.

ctlMaximumBytesGets the Maximum value as a string formatted in Bytes/MB/GB/TB.

ctlMinimumGets or sets the minimum value of the range of the control.

ctlMinimumBytesGets the Minimum value as a string formatted in Bytes/MB/GB/TB.
ctlOrientationGets or sets a value indicating the horizontal or vertical orientation of the control.

ctlPercentGets a value representing a percent of Value vs Maximum - Minimum

ctlPerformStepAdvances the current position of the progress bar by the amount of the ctlStep property.

ctlPlaySpecifies if the progress bar should increment its value automatically.
ctlRecreatingHandleGets a value indicating whether the control is currently re-creating its handle.

ctlRefreshForces the control to invalidate its client area and immediately redraw itself and any child controls.

ctlRepeatDEPRECATED.

ctlResetResets the Value property to ctlMinimum or to ctlMaximum with an optional parameter.
ctlResetBackColorResets the ctlBackColor property to its default value.
ctlResetBorderColorResets the ctlBorderColor property to its default value.
ctlResetFontResets the ctlFont... properties to its default values.
ctlResetForeColorResets the ctlForeColor property to its default value.
ctlRightGets the distance, in pixels, between the right edge of the control and the left edge of its container's client area.
ctlShowDisplays the control to the user. Showing the control is equivalent to setting the ctlVisible property to true.
ctlShowFocusCuesGets or sets a value indicating whether the control should display focus rectangles.

ctlSizeAdjustDEPRECATED. Replaced by the .NET equivalent ctlAutoSize property.

ctlSmoothSpecifies if the bar will be shown as one continous block, or as a group of small individual blocks.

ctlStateVISTA. Sets the state of the progress bar: Normal, Error or Paused.

ctlStepGets or sets the amount by which the ctlPerformStep or ctlStepIt methods increase the current position of the progress bar.

ctlStepItIncrements the value of the control by the amount specified in ctlStep.

ctlStyleNOT LIKE THE .NET equivalent PROPERTY. Specifies the style of the progress bar border.
ctlThemesSpecifies if themes are used for the control.
ctlValueSpecifies the current value or state of the control.

ctlValueBytesGets the current value as a string formatted in Bytes/MB/GB/TB.
ctlValueChangedOccurs when the ctlValue property changes.

ctlValuePercentReturns a character string of the current ctlPercent value formatted with a % sign.

ctlVerticalDEPRECATED. Replaced by the .NET equivalent ctlOrientation property.
ctlVisibleGets or sets a value indicating whether the control is displayed.







Windows Vista

Window XP, Silver Theme.

Windows XP, Marquee Style.

Windows XP, standard Theme

Windows XP, Olive Theme.

Windows XP, custom Theme.

Progressbar Themes disabled, like Office 2003 Install progressbar.

Windows XP Classic Theme, Smooth Style.

Window XP Classic Theme.

Windows XP, Classic Theme, Marquee Style.





1 comment: