Article ID: 167192
Article Last Modified on 6/29/2004
0 (Default) None - Panel has no status bar capability and the
caption (if any) is displayed.
1 - Left to right.
2 - Right to left.
3 - Top to bottom.
4 - Bottom to top.
5 - From the center outward in a widening circle.
Threed Panel will be painted in a color base on the above setting, which
is specified by the FloodColor property, as the FloodPercent property
increases.
PUBLIC x
x=CREATEOBJECT("progress")
x.SHOW
**************************************************
*-- Class: progress
*-- ParentClass: form
*-- BaseClass: form
*
DEFINE CLASS progress AS form
Top = 0
Left = 0
Height = 198
Width = 378
DoCreate = .T.
Caption = "Form1"
Name = "Form1"
ADD OBJECT timer1 AS Timer WITH ;
Top = 9, ;
Left = 18, ;
Height = 23, ;
Width = 23, ;
Enabled = .F., ;
Interval = 100, ;
Name = "Timer1"
ADD OBJECT command1 AS CommandButton WITH ;
Top = 121, ;
Left = 71, ;
Height = 27, ;
Width = 247, ;
Caption = "Click Me to Begin Task", ;
Name = "Command1"
ADD OBJECT sspanel1 AS sspanel WITH ;
Top = 27, ;
Left = 28, ;
Height = 72, ;
Width = 328, ;
Name = "sspanel1"
ADD OBJECT command2 AS CommandButton WITH ;
Top = 159, ;
Left = 70, ;
Height = 26, ;
Width = 247, ;
Caption = "Reset", ;
Name = "Command2"
PROCEDURE Init
* Set the FloodType from Left to Right
THISFORM.sspanel1.FloodType = 1
* Initialize the FloodPercent to 0
THISFORM.sspanel1.FloodPercent = 0
THISFORM.sspanel1.FloodShowPct = .T. && Show the percent sign
ENDPROC
PROCEDURE timer1.Timer
IF THISFORM.sspanel1.FloodPercent < 100
THISFORM.sspanel1.FloodPercent = ;
THISFORM.sspanel1.FloodPercent + 1
ELSE
THISFORM.timer1.Enabled = .F.
THISFORM.command1.Caption = "Click Me to Begin Task"
WAIT WINDOW "Task Completed"
THISFORM.sspanel1.FloodPercent = 0
ENDIF
ENDPROC
PROCEDURE command1.Click
IF THIS.Caption = "Click Me to Begin Task"
THIS.Caption = "Click Me to Stop Task"
THISFORM.timer1.Enabled = .T.
ELSE
THIS.Caption = "Click Me to Begin Task"
THISFORM.timer1.Enabled = .F.
ENDIF
ENDPROC
PROCEDURE command2.Click
THISFORM.Timer1.Enabled = .F.
THISFORM.sspanel1.FloodPercent = 0
THISFORM.Command1.Caption = "Click Me to Begin Task"
ENDPROC
ENDDEFINE
DEFINE CLASS sspanel AS OLECONTROL
OLEClass = "Threed.SSPanel"
ENDDEFINE
*
*-- EndDefine: progress
**************************************************
Keywords: kbhowto kbinterop kboop KB167192