Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MS patch for fast computers
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00169039
Message ID:
00172060
Views:
44
Hi John,

>People have accepted the fact that the Close Box in FPW does not work. Nobody has ever demanded MS patch that. And for that issue - there is no workaround or third-party solution.

While it doesn't give the button an enabled appeareance and it doesn't let the button look as if it has been pressed, the following code quits the application, when the user clicks on the X-button.
  *-- This value contains the width of the
  *   X-Button in Foxel.
  #DEFINE ccXButton 2

  *-- Activate additional handler
  ON KEY LABEL LEFTMOUSE DO CheckShutDown
  
  *-- Check whether X-Button was clicked. We wait
  *   until the user released the button.
  PROCEDURE CheckShutDown
    Private lcWindow
    lcWindow = MWindow()
    IF MROW(lcWindow) == -1 AND ;
       MCOL(lcWindow) > WCOL(lcWindow) - ccXButton
       DO WHILE MDOWN()
       ENDDO
       IF MROW(lcWIndow) == -1 AND ;
          MCOL(lcWindow) > WCOL(lcWindow) - ccXButton
          QUIT
       ENDIF
    ENDIF
  RETURN
Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform