|
ctl32_progressbar |
ctl32_progressbar: overview | members | pictures MSDN .NET System.Windows.Forms.ProgressBar 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, with full Themes compliance, just a couple of files to add to your project, No DLLs, no FLLs, no OCXs. The following files should be added to your project, copy all the files to the same folder: ctl32.h This class is based in the ctl32_controlbase Windows Common Controls abstract class. 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.
See Also: |
|
|
|