>PUBLIC oform1 > >oform1=NEWOBJECT("form1") >oform1.Show >RETURN > >DEFINE CLASS form1 AS form > > > DoCreate = .T. > Caption = "Form1" > myproperty = .NULL. && VAL(.NULL.) is the workaround > Name = "form1" > > ADD OBJECT spinner1 AS spinner WITH ; > Height = 24, ; > Left = 24, ; > Top = 14, ; > Width = 121, ; > ControlSource = "m.thisform.MyProperty", ; > Name = "Spinner1" > > > ADD OBJECT command1 AS commandbutton WITH ; > Top = 13, ; > Left = 156, ; > Height = 27, ; > Width = 84, ; > Caption = "Other focus", ; > Name = "Command1" > > > ADD OBJECT command2 AS commandbutton WITH ; > Top = 51, ; > Left = 29, ; > Height = 27, ; > Width = 84, ; > Caption = "Release", ; > BackColor = RGB(255,255,0), ; > Name = "Command2" > > > ADD OBJECT label1 AS label WITH ; > AutoSize = .T., ; > FontSize = 15, ; > Alignment = 2, ; > BorderStyle = 1, ; > Caption = "Press Esc To Force Exit", ; > Height = 26, ; > Left = 126, ; > Top = 53, ; > Width = 216, ; > ForeColor = RGB(255,0,0), ; > BackColor = RGB(255,255,0), ; > Name = "Label1" > > PROCEDURE Unload > ON ERROR > ON KEY LABEL ESC > ENDPROC > > PROCEDURE Load > * without next line you go into a panic status, and you must kill VFP > *ON ERROR MESSAGEBOX(MESSAGE()) > * with ON ERROR you can close the window only with a CLEAR ALL > ON KEY LABEL ESC CLEAR ALL > ENDPROC > > PROCEDURE command2.Click > * this is ignored > thisform.release > RELEASE WINDOWS (m.this.Name) > ENDPROC > > PROCEDURE spinner1.InteractiveChange > WAIT WINDOWS VARTYPE(m.this.Value) NOWAIT NOCLEAR > ENDPROC > > PROCEDURE spinner1.Destroy > WAIT WINDOWS CLEAR > ENDPROC > >ENDDEFINE >>