PUBLIC oform1 SET CLASSLIB TO f:\program files\microsoft visual studio\vfp98\enddisimage.vcx ADDITIVE oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- Class Library: f:\program files\microsoft visual studio\vfp98\enddisimage.vcx ************************************************** ************************************************** *-- Class: endisimage (f:\program files\microsoft visual studio\vfp98\enddisimage.vcx) *-- ParentClass: image *-- BaseClass: image *-- Time Stamp: 01/16/01 08:56:12 PM * DEFINE CLASS endisimage AS image Height = 17 Width = 100 enabledpicture = (getpict()) disabledpicture = (getpict()) Name = "endisimage" PROCEDURE enabled_assign LPARAMETERS vNewVal *To do: Modify this routine for the Assign method IF m.vNewVal this.picture = this.enabledpicture ELSE this.picture = this.disabledpicture endif THIS.Enabled = m.vNewVal ENDPROC PROCEDURE Init this.enabled = .t. ENDPROC ENDDEFINE * *-- EndDefine: endisimage ************************************************** ************************************************** *-- Form: form1 (f:\program files\microsoft visual studio\vfp98\ff1.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 01/16/01 09:04:05 PM * DEFINE CLASS form1 AS form DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT im1 AS endisimage WITH ; Height = 60, ; Left = 96, ; Top = 72, ; Width = 120, ; disabledpicture = (getpict()), ; enabledpicture = (getpict()), ; Name = "im1" ADD OBJECT command1 AS commandbutton WITH ; Top = 168, ; Left = 156, ; Height = 27, ; Width = 84, ; Caption = "Command1", ; Name = "Command1" PROCEDURE command1.Click thisform.im1.enabled = ! thisform.im1.enabled ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************The demo class and form were created visually, and exported as code using the Class Browser.