Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ON KEY LABEL......
Message
 
À
04/11/2001 20:52:36
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00577245
Message ID:
00577254
Vues:
26
Hi So,

On Key Label happens outside the scope of the form, so you can't use the THISFORM construct. You have a few options:

  1. As Michael has suggested, add a button a hotkey to the button (although this won't let you use F5)
  2. Use the form's keypress event and set KeyPreview to .T.
  3. Set a public variable to reference the form object and ON KEY LABEL F5 return goForm.cmdAddItem.Click()
  4. Add a menu or popup with a hotkey that calls the method.

Note that you can use 1 and 2 together to give more than one way to get at the functionality.

HTH

Cheers,

Andrew

>Dear all.
>
>Suppose I have a commandbutton 'cmdAddItem' on the form 'MyForm'. At the init event of the form 'MyForm' I have the coding segment:
>
>On Key Label F5 thisform.amdAddItem.click()
>
>so that the user may do the same job by clicking the commandbutton or press {F5}
>
>Is this possible or otherwise any alternative?
>
>
>
>With regards,
>
>
>
>Ransome


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform