Article ID: 139388
Article Last Modified on 6/29/2004
PUBLIC othermometer
othermometer = CreateObject('thermometer')
othermometer.Visible = .T.
DEFINE CLASS thermometer AS form
Height = 73
Width = 385
DoCreate = .T.
AutoCenter = .T.
Caption = ""
Closable = .F.
ControlBox = .F.
MaxButton = .F.
MinButton = .F.
Movable = .F.
Name = "Form1"
ADD OBJECT shape2 AS shape WITH ;
Height = 25, ;
Left = 24, ;
Top = 24, ;
Width = 336, ;
Name = "Shape2"
ADD OBJECT shape1 AS shape WITH ;
BackColor = RGB(0,0,255), ;
Height = 25, ;
Left = 24, ;
Top = 24, ;
Width = 0, ;
Name = "Shape1"
ADD OBJECT timer1 AS timer WITH ;
Top = 0, ;
Left = 0, ;
Height = 23, ;
Width = 23, ;
Interval = 100, ;
Name = "Timer1"
PROCEDURE timer1.Timer
IF This.Parent.shape1.Width<336
This.Parent.shape1.Width=This.Parent.shape1.Width+2
ELSE
WAIT WINDOW 'Finished!'
Thisform.Release
ENDIF
ENDPROC
ENDDEFINE
PUBLIC othermometer
othermometer = CreateObject('thermometer')
othermometer.Visible = .T.
i=0
SET CONSOLE OFF
DO WHILE i<100
WAIT TIMEOUT 1 && Place application-specific code here
othermometer.update()
i=i+1
ENDDO
WAIT WINDOW 'Finished'
othermometer.Release
DEFINE CLASS thermometer AS form
Height = 73
Width = 349
DoCreate = .T.
AutoCenter = .T.
Caption = ""
Closable = .F.
ControlBox = .F.
MaxButton = .F.
MinButton = .F.
Movable = .F.
Name = "Form1"
ADD OBJECT shape2 AS shape WITH ;
Height = 25, ;
Left = 24, ;
Top = 24, ;
Width = 300, ;
Name = "Shape2"
ADD OBJECT shape1 AS shape WITH ;
BackColor = RGB(0,0,255), ;
Height = 25, ;
Left = 24, ;
Top = 24, ;
Width = 0, ;
Name = "Shape1"
ADD OBJECT timer1 AS timer WITH ;
Top = 0, ;
Left = 0, ;
Height = 23, ;
Width = 23, ;
Interval = 100, ;
Name = "Timer1"
PROCEDURE update
This.shape1.Width=This.shape1.Width+3
ENDPROC
ENDDEFINE
Keywords: kbhowto kbcode KB139388