PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
Top = 0
Left = 0
Height = 148
Width = 619
DoCreate = .T.
Caption = "Form1"
Name = "Form1"
complete = .F.
ADD OBJECT text1 AS textbox WITH ;
FontBold = .T., ;
FontSize = 20, ;
BackStyle = 1, ;
Height = 48, ;
Left = 24, ;
SpecialEffect = 1, ;
Top = 17, ;
Width = 500, ;
Style = 0, ;
BackColor = RGB(192,192,192), ;
BorderColor = RGB(192,192,192), ;
Name = "Text1"
ADD OBJECT timer1 AS timer WITH ;
Top = 12, ;
Left = 264, ;
Height = 23, ;
Width = 23, ;
Interval = 1000, ;
Name = "Timer1"
ADD OBJECT command1 AS commandbutton WITH ;
Top = 96, ;
Left = 36, ;
Height = 27, ;
Width = 84, ;
Caption = "Complete", ;
Name = "Command1"
PROCEDURE Init
store time() to thisform.text1.value
ENDPROC
PROCEDURE Load
set talk off
set cursor off
ENDPROC
PROCEDURE timer1.Timer
IF THISFORM.COMPLETE
STORE cdow(date())+" "++cmonth(date())+" "+transform(day(date()))+" "+transform(year(date()))+" "+time() TO THISFORM.TEXT1.VALUE
ELSE
store time() to thisform.text1.value
ENDIF
ENDPROC
PROCEDURE command1.Click
IF this.caption="Complete"
this.caption = "Time only"
thisform.complete =.T.
ELSE
this.caption="Complete"
thisform.complete =.F.
ENDIF
ENDPROC
ENDDEFINE