Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stop form
Message
De
27/06/2002 11:28:06
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00672891
Message ID:
00672902
Vues:
11
>Hi everybody,
>
>We have an application, called Querier, which executes different types of queries stored in a MetaFile. In some cases we use saved user's criteria. In order to retrieve these criteria we use another complicated application called BtCrit. This application has a form which supports RUN and Design actions. In RUN mode the form still has to be instantiated, but it's not visible to the user.
>
>Anyway, Querier has ability to stop query by pressing ESC. I just tried to press ESC too earlier (when BTCrit form was instantiated) and got VFP standard Interrupted message with Suspend Ignore Cancel buttons...
>
>What can I do to stop the form and clearly return to the calling procedure in the middle of Init by pressing ESC?
>
>Thanks a lot in advance.

Nadya,

There may be other possibilities.
if the load() takes long add this to the load as well
&& begin of init()

local sEscape, sOnEscape
Private Escaped
Escaped = .F.
sEscape = Set('Escape')
sOnEscape = On('Escape')
on escape escaped = .T.
set escape On

** in the middle
if( Escaped )
        on escape &sOnEscape
        set escape &sEscape
	return .F.
endif

&& end of init
on escape &sOnEscape
set escape &sEscape
if( Escaped )
	return .F.
endif
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform