DEFINE CLASS form1 AS form Top = 0 Left = 0 Height = 100 Width = 300 DoCreate = .T. Caption = "Form1" lsemimodal = .F. && -- lSemiModal - this form is running in semi-modal mode Name = "Form1" ADD OBJECT command1 AS commandbutton WITH ; Top = 20, ; Left = 23, ; Height = 27, ; Width = 84, ; Caption = "Command1", ; Name = "Command1" ADD OBJECT check1 AS checkbox WITH ; Top = 25, ; Left = 151, ; Height = 17, ; Width = 86, ; AutoSize = .T., ; Caption = "Semi-modal", ; ControlSource = "thisform.lSemiModal", ; Name = "Check1" PROCEDURE Deactivate debugout program() if ( this.lSemiModal ) * pull focus back to this form this.command1.SetFocus() endif ENDPROC PROCEDURE Activate debugout program() ENDPROC PROCEDURE GotFocus debugout program() ENDPROC PROCEDURE LostFocus debugout program() ENDPROC PROCEDURE Load activate window "debug output" this.Name = sys(2015) this.Caption = this.Name ENDPROC ENDDEFINEIt is obvious that if I use 1000 variable ones of state in order to chase all the possible sequences of the events, considering the RETURN F. that they block to the When/Valid and the NODEFAULT that block the LostFocus, < b>perhaps it is possible to block all the undesired operations that VFP executes.