PUBLIC oform1 > >oform1=NEWOBJECT("form1") >oform1.Show >RETURN > >*-- Form: form1 (someform.scx) >*-- ParentClass: form >*-- BaseClass: form >*-- Time Stamp: 09/26/05 01:33:11 AM >* >DEFINE CLASS form1 AS form > > Top = 0 > Left = 0 > Height = 286 > Width = 761 > DoCreate = .T. > Caption = "Form1" > Name = "Form1" > > PROCEDURE Init > local lnX, lnY, lnW, lcW > >* set classlib to someclasslib.vcx > > for lnW = 1 to 52 > lnX = ( mod( m.lnW - 1, 13 ) ) * 50 + 50 > lnY = ceil( lnW / 13 ) * 20 > lcW = 'lblWeek' + padl( m.lnW, 2, '0' ) > this.addobject( m.lcW, 'weekno', 2005, lnW ) > with this.&lcW > .left = m.lnX > .top = m.lnY > .visible = .T. > endwith > next > > this.showtips = .t. > ENDPROC >ENDDEFINE > >*-- Class: weekno (someclasslib.vcx) >*-- ParentClass: label >*-- BaseClass: label >*-- Time Stamp: 09/26/05 01:19:07 AM >* >DEFINE CLASS weekno AS label > > Caption = "Label1" > Height = 17 > Width = 40 > Name = "weekno" > nWeek = .F. > nYear = .F. > > PROCEDURE Init > lparameter tnYear, tnWeek > > with this > .nYear = m.tnYear > .nWeek = m.tnWeek > .caption = str( .nWeek, 2 ) > .tooltiptext = dtoc( DATE(.nYear,1,1)-DOW(DATE(.nYear,1,1),3) + .nWeek*7 ) > endwith > ENDPROC >ENDDEFINE