Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MS patch for fast computers
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00169039
Message ID:
00172060
Vues:
45
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform