pocket programs

Home
Products
Download
Licences
Support
Contact
DateTimePicker
MonthCal
Trackbar
Up-Down
Keypad
Sketch
Progressbar
-Methods
-Styles
-Constants
-Example

Buy-Now
Support
Contact

Progress Bar Controls

PP Controls provides progress bars for inclusion in your embedded visual basic forms. The progress bas can be mounted vertically or horizontally and can use smooth or block movement.


Progress Bar - Methods & Properties

NewProgress

Long hWnd = PPCtrl.NewProgress(hWnd, dwStyle)

Creates a new Progress Bar and returns the handle of the new control.

hWnd hWnd of parent form (or frame) or placeholder (hWnd)
DwStyle Specifies the style of the window being created.
If the style PC_PLACEHOLDER is specified, then hWnd refers to the control to be used as a as placeholder. The new Progress Bar will be placed on the form at the same location as this control, with the same size and font. The place-holder control is then hidden. Note: If PC_PLACEHOLDER style is not given, then hWnd specifies the parent window for the new control. The new control is positioned according to the current values of PPCtrl.Left, PPCtrl.Top, PPCtrl.Width and PPCtrl.Height. The font of the parent window is used.
PB1 = PPCtrl.NewProgress(Text1.hWnd, PC_PLACEHOLDER) PB2 = PPCtrl.NewProgress(hwnd, PBS_SMOOTH)

Min, Max

PPPCtrl.Min(hWnd) = long PPCtrl.Max(hWnd) = long long = PPCtrl.Min(hWnd) long = PPCtrl.Max(hWnd)

Retrieves/Sets the current minimum and maximum positions for the progress control specified by hWnd.

PPCtrl.Min(pb1) = 1 PPCtrl.Max(pb1) = 100

Pos

PPCtrl.Pos(hWNd) = long<br> long = PPCtrl.Pos(hWnd)

Retrieves/Sets the currently position of the progress control specified by hWnd.

PPCtrl.Pos(Tb1)=100 level=PPCtrl.Pos(Tb1)

Step

PPCtrl.Step(hWNd) = long

Sets step size for the step-it command for the progress control specified by hWnd.

PPCtrl.Step(Tb1)=10

StepIt

PPCtrl.StepIt(hWNd)

Steps the progress control specified by hWnd.

PPCtrl.StepIt(Tb1)

Progress Bar – Styles

PBS_SMOOTH

Makes the progress bar update in single steps, default block updates.

PBS_VERTICAL

Vertically drawn progress bar.


Progress Bar - Constants

Const PBS_SMOOTH = &H1 ' smooth updates Const PBS_VERTICAL = &H4 ' vertical progress bar

Progress Bar - Example

Dim PPCtrl As Object Set PPCtrl = CreateObject("PPControl.Controls") Progress = PPCtrl.NewProgress(Text17.hWnd, PC_PLACEHOLDER + WS_BORDER) PPCtrl.Min(Progress) = 0 PPCtrl.Max(Progress) = 200 Progress2 = PPCtrl.NewProgress(Text4.hWnd, PC_PLACEHOLDER + WS_BORDER + PBS_VERTICAL + PBS_SMOOTH) PPCtrl.Min(Progress2) = 0 PPCtrl.Max(Progress2) = 100
Private Sub Command15_Click() Dim i PPCtrl.Step(Progress) = 1 For i = 1 To 200 PPCtrl.StepIt (Progress) Next For i = 1 To 100 PPCtrl.pos(Progress) = i Next End Sub