PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- Form: form1 *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 06/19/06 01:45:01 PM * DEFINE CLASS form1 AS form Top = 0 Left = 0 Height = 250 Width = 490 DoCreate = .T. Caption = "Form1" BackColor = RGB(0,253,253) Name = "Form1" ADD OBJECT shape1 AS shape WITH ; Top = 36, ; Left = 48, ; Height = 204, ; Width = 240, ; BorderStyle = 0, ; BackColor = RGB(0,223,223), ; Name = "Shape1" ADD OBJECT edit1 AS editbox WITH ; Height = 205, ; Left = 36, ; Top = 24, ; Width = 241, ; Name = "Edit1" ADD OBJECT spinner1 AS spinner WITH ; Height = 24, ; KeyboardHighValue = 100, ; KeyboardLowValue = 1, ; Left = 324, ; ReadOnly = .F., ; SpinnerHighValue = 100.00, ; SpinnerLowValue = 1.00, ; Top = 60, ; Width = 84, ; Value = 1, ; Name = "Spinner1" PROCEDURE Init thisform.BackColor = GETCOLOR(thisform.BackColor) thisform.spinner1.InteractiveChange() ENDPROC PROCEDURE spinner1.InteractiveChange LOCAL lnR as Integer, ; lnG as Integer, ; lnB as Integer m.lnR = BITAND(thisform.BackColor,0x0000ff) m.lnG = BITRSHIFT(BITAND(thisform.BackColor,0x00ff00),8) m.lnB = BITRSHIFT(BITAND(thisform.BackColor,0xff0000),16) IF m.lnR > 0 ; THEN m.lnR = INT(m.lnR * (1 - thisform.spinner1.Value/100)) ENDIF IF m.lnG > 0 ; THEN m.lnG = INT(m.lnG * (1 - thisform.spinner1.Value/100)) ENDIF IF m.lnB > 0 ; THEN m.lnB = INT(m.lnB * (1 - thisform.spinner1.Value/100)) ENDIF thisform.shape1.BackColor = RGB(m.lnR,m.lnG,m.lnB) ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature