>oForm = CREATEOBJECT([Form1]) >oForm.Show(1) > >************************************************** >*-- Form: form1 (d:\works\test.scx) >*-- ParentClass: form >*-- BaseClass: form >*-- Time Stamp: 07/09/07 07:08:04 PM >* >DEFINE CLASS form1 AS form > > > Top = 0 > Left = 0 > Height = 98 > Width = 240 > DoCreate = .T. > Caption = "Form1" > Name = "Form1" > > > ADD OBJECT spnred AS spinner WITH ; > Height = 24, ; > KeyboardHighValue = 255, ; > KeyboardLowValue = 0, ; > Left = 116, ; > SpinnerHighValue = 255.00, ; > SpinnerLowValue = 0.00, ; > Top = 9, ; > Width = 120, ; > Name = "spnRed" > > > ADD OBJECT spngreen AS spinner WITH ; > Height = 24, ; > KeyboardHighValue = 255, ; > KeyboardLowValue = 0, ; > Left = 116, ; > SpinnerHighValue = 255.00, ; > SpinnerLowValue = 0.00, ; > Top = 37, ; > Width = 120, ; > Name = "spnGreen" > > > ADD OBJECT spnblue AS spinner WITH ; > Height = 24, ; > KeyboardHighValue = 255, ; > KeyboardLowValue = 0, ; > Left = 116, ; > SpinnerHighValue = 255.00, ; > SpinnerLowValue = 0.00, ; > Top = 61, ; > Width = 120, ; > Name = "spnBlue" > > > ADD OBJECT label1 AS label WITH ; > Caption = "Red", ; > Height = 17, ; > Left = 62, ; > Top = 13, ; > Width = 40, ; > Name = "Label1" > > > ADD OBJECT label2 AS label WITH ; > Caption = "Green", ; > Height = 17, ; > Left = 62, ; > Top = 43, ; > Width = 40, ; > Name = "Label2" > > > ADD OBJECT label3 AS label WITH ; > Caption = "Blue", ; > Height = 17, ; > Left = 62, ; > Top = 66, ; > Width = 40, ; > Name = "Label3" > > > PROCEDURE spnred.InteractiveChange > thisform.BackColor = RGB(this.Value, thisform.spnGreen.Value, thisform.spnBlue.Value) > ENDPROC > > > PROCEDURE spngreen.InteractiveChange > thisform.BackColor = RGB(thisform.spnRed.Value, this.Value, thisform.spnBlue.Value) > ENDPROC > > > PROCEDURE spnblue.InteractiveChange > thisform.BackColor = RGB(thisform.spnRed.Value, thisform.spnGreen.Value, this.Value) > ENDPROC > > >ENDDEFINE >* >*-- EndDefine: form1 >************************************************** > >>(error handling and test for invalid values are not included :-))