Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating an auto-repeat command button
Message
De
10/01/2002 23:35:26
 
 
À
10/01/2002 23:17:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00603161
Message ID:
00603336
Vues:
18
I'm sorry again. Right you are about point number 2. This fixes that:
LPARAMETERS nKeyCode, nShiftAltCtrl

if nKeyCode = 32
	nKeyCode = 13
	nodefault
	dodefault(nKeyCode, nShiftAltCtrl)
endif
>Hi Steve,
>
>Thanks for your feedback! I tried your suggestion and it failed for 2 reasons:
>
>1. The KeyPress event on a command button isn't fired until the user releases the space key (after the 'KeyUp' event). If command buttons had a 'KeyDown' event then your idea would probably work.
>
>2. Strange, but true - under VFP 7 (didn't try VFP 6), your code prevents the command button from losing focus via the keyboard. I can change focus by using the mouse, but the tab and arrow keys will not exit me from the command button.
>
>Any other suggestions? What I think(?!) I'm looking for is a Windows API function to check for a KeyDown event (KeyPressed vs. KeyPress?). I guess I would have to set a timer to check the status of the Space key - if pressed, do the Click event.
>
>Malcolm
>
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform