Article ID: 131081
Article Last Modified on 2/15/2000
oMyForm = CREATEOBJECT("MyForm")
oMyForm.show
READ EVENTS
DEFINE CLASS MyForm AS FORM
ADD OBJECT Button1 AS COMMANDBUTTON WITH ;
caption="QUIT"
PROCEDURE Click
Local cColor cRGB
m.cRGB = RGBSCHEME(1,2)
m.cColor = 'RGB(' + SUBSTR(m.cRGB, AT(',', m.cRGB, 3) +1)
This.BackColor = EVAL(cColor)
ENDPROC
PROCEDURE button1.Click
CLEAR EVENTS
ENDPROC
ENDDEFINE
THISFORM.RELEASENOTE: This code differs from that used in the code example. The command THISFORM.RELEASE is used instead of CLEAR EVENTS because the READ EVENTS is not used to keep the form in memory when DO FORM <formname> is used.
Local cColor cRGB
m.cRGB = RGBSCHEME(1,2)
m.cColor = 'RGB(' + SUBSTR(m.cRGB, AT(',', m.cRGB, 3) +1)
This.BackColor = EVAL(cColor)
Additional query words: VFoxWin
Keywords: kbcode KB131081