**************************************************
*-- Class: lotfimontre (c:\gestion\lotfimontre.vcx)
*-- ParentClass: form
*-- BaseClass: form
*
*********************************************************
public lmontre
SET CLASSLIB TO lotfimontre
lmontre = CREATEOBJ('lotfimontre')
lmontre.SHOW
*********************************************************
DEFINE CLASS lotfimontre AS form
ScaleMode = 3
Top = 21
Left = 99
Height = 156
Width = 156
ShowWindow = 2
DoCreate = .T.
Picture = ""
BorderStyle = 0
Caption = ""
ControlBox = .F.
Closable = .T.
HalfHeightCaption = .T.
MaxButton = .F.
MinButton = .F.
WindowState = 0
AlwaysOnTop = .T.
BackColor = RGB(0,0,0)
Name = "Form"
ADD OBJECT image1 AS image WITH ;
Picture = "hour2.bmp", ; && n'oublier pas pict de la montre
Height = 156, ;
Left = 0, ;
Top = 0, ;
Width = 156, ;
Name = "Image1"
ADD OBJECT timer1 AS timer WITH ;
Top = 24, ;
Left = 48, ;
Height = 23, ;
Width = 23, ;
Enabled = .T., ;
Interval = 1000, ;
Name = "Timer1"
ADD OBJECT label4 AS label WITH ;
FontName = "MS Sans Serif", ;
FontSize = 8, ;
Alignment = 2, ;
BackStyle = 1, ;
Caption = "0", ;
Height = 13, ;
Left = 91, ;
Top = 75, ;
Width = 17, ;
BackColor = RGB(255,255,255), ;
Name = "Label4"
ADD OBJECT label5 AS label WITH ;
FontBold = .T., ;
FontName = "MS Sans Serif", ;
FontSize = 8, ;
BackStyle = 0, ;
Caption = "today", ;
Height = 14, ;
Left = 42, ;
Top = 134, ;
Width = 71, ;
ForeColor = RGB(255,255,255), ;
Name = "Label5"
ADD OBJECT label1 AS label WITH ;
Alignment = 2, ;
BackStyle = 0, ;
Caption = "lotfi072003@yahoo.fr", ;
Height = 16, ;
Left = 0, ;
Top = 0, ;
Width = 157, ;
ForeColor = RGB(255,255,255), ;
Name = "Label1"
PROCEDURE Init
this.halfheightcaption=.F.
ENDPROC
PROCEDURE KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode=27
thisform.release
endif
ENDPROC
PROCEDURE timer1.Timer
local x,y,r,m.sec,m.min,m.hour
x=thisform.image1.height/2
y=thisform.image1.width/2
r= 45 && rayon du cercle
m.sec=6*sec(datetime()) && 1 periode = 6* nbr de seconde (60 seconde)
m.min=6*minute(datetime()) && 1 periode = 6* nbr de minute (60 minute)
m.hour=5*(6*hour(datetime()))+int(m.min/12) && 1 periode = 6 nbr de heur (12 minute)*5+plus nbre de munite /12 ecoulé
thisform.label4.caption=alltrim(str(day(date())))
thisform.label5.caption=alltrim(dtoc(date()))
thisform.cls
thisform.drawWidth=1
thisform.forecolor=rgb(255,0,0) && couleur pour les secondes
thisform.line(x,y,x+(R*cos(dtor(m.sec-90))),y+(R*sin(dtor(m.sec-90))))) && - 90 pour intialiser l'angle de dessin
thisform.drawWidth=2.2
thisform.forecolor=rgb(255,255,0) && couleur pour minute
thisform.line(x,y,x+((R-5)*cos(dtor(m.min-90))),y+((R-5)*sin(dtor(m.min-90))))
thisform.drawWidth=3.5
thisform.forecolor=rgb(255,255,0) && couleur pour les heurs
thisform.line(x,y,x+((R-15)*cos(dtor(m.hour-90))),y+((R-15)*sin(dtor(m.hour-90))))
IF thisform.left=>800
thisform.left=-100
else
thisform.left=thisform.left+2
endif
ENDPROC
ENDDEFINE
*
*-- EndDefine: lotfimontre
**************************************************
|
Au moins un erreur de syntaxe sur mon systeme
thisform.line(x,y,x+(R*cos(dtor(m.sec-90))),y+(R*sin(dtor(m.sec-90)))))