DEFINE CLASS test AS form DoCreate = .T. Caption = "Form1" WindowType = 1 Name = "Form1" menuisup = .F. ADD OBJECT command1 AS commandbutton WITH ; Top = 168, ; Left = 216, ; Height = 37, ; Width = 97, ; Caption = "Command1", ; Name = "Command1" PROCEDURE menuisup_assign LPARAMETERS vNewVal IF !This.MenuIsUP * Display Menu here ELSE * Remove Menu here ENDIF THIS.menuisup = m.vNewVal ENDPROC PROCEDURE MouseMove LPARAMETERS nButton, nShift, nXCoord, nYCoord IF This.MenuIsUp This.MenuIsUp = .F. ENDIF ENDPROC PROCEDURE command1.MouseMove LPARAMETERS nButton, nShift, nXCoord, nYCoord IF !ThisForm.Menuisup ThisForm.MenuIsUp = .T. ENDIF ENDPROC ENDDEFINE