Public oform1 oform1=Newobject("form1") oform1.Show Return ************************************************** *-- Form: form1 (f:\temp\temp.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 02/17/05 03:17:14 PM * Define Class form1 As Form DoCreate = .T. Caption = "Form1" Name = "Form1" Add Object text1 As TextBox With ; Alignment = 3, ; Value = (Date()), ; ControlSource = "temp.d1", ; Height = 23, ; Left = 136, ; Top = 49, ; Width = 100, ; Name = "Text1" Add Object check1 As Checkbox With ; Top = 52, ; Left = 249, ; Height = 17, ; Width = 79, ; Caption = "Century On", ; Name = "Check1" Procedure Load Set Century Off Create Cursor temp (d1 d) Insert Into temp Values (Date()) Endproc Procedure check1.Click If This.Value This.Parent.text1.Century = 1 Else This.Parent.text1.Century = 2 Endif Endproc Procedure check1.Init This.Value = This.Parent.text1.Century = 1 Endproc Enddefine * *-- EndDefine: form1 **************************************************