Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hot keys for buttons
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Hot keys for buttons
Divers
Thread ID:
00665597
Message ID:
00665597
Vues:
55
Hi everybody,

How can I find out, if button has a Hot Key (letter highlighted) and what's the value of it. Say, I have Cancel button with first letter highlighted. I added in my CancelValidation method of the form:
********************************************************************
*  Description.......: CancelValidation
*  Calling Samples...:
*  Parameter List....:
*  Created by........: John Koziol
*  Modified by.......:
********************************************************************
local nCancelTop,nCancelHeight,nCancelLeft,nCancelWidth, llReturn
nCancelTop=thisform.cmdCancel.top
nCancelBottom=m.nCancelTop+thisform.cmdCancel.height
nCancelLeft=thisform.cmdCancel.left
nCancelRight=m.nCancelLeft+thisform.cmdCancel.width
llReturn = .f.
if between(mrow(thisform.name,3),m.nCancelTop,m.nCancelBottom) and ;
		between(mcol(thisform.name,3),m.nCancelLeft,m.nCancelRight) and ;
		mdown()
	llReturn = .t.
endif
return m.llReturn or lastkey()= 46 && Alt+C (shortcut for Cancel)
Is there a way to make this more generic (e.g. find out key combination for Cancel button automatically)?
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform