Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controls fire twice
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01410388
Message ID:
01410390
Vues:
125
This message has been marked as the solution to the initial question of the thread.
>I can't find my notes on this, but I think I have run across this before.
>
>I have a main form that has several control buttons on the form. When I just made the change to put action leters in the control captions and a big do case in the form keypress event to operate the control buttons when I press the underlined letter. Like Alt-A for "Add New"
>
>When I use the key press to do any command that opens a new form, the form opens again after I release it.
>
>Clear Typeahead has no effect. Somehow the command button Click is firing twice.
>
>My form keypress event has stuff like...
>
>CASE nKeyCode = 49 && Alt-N Add New
> thisform.cmdAddNew.Click
>CASE nKeyCode = 25 && Alt-P RePorts
> thisform.cmdReport.Click
>
>
>Any ideas?
>
>TIA

Ron,

Add NODEFAULT after thisform.... Click for each case.

In other words,
CASE nKeyCode = 49 && Alt-N Add New
   thisform.AddNew()
   nodefault
 CASE nKeyCode = 25 && Alt-P RePorts
    thisform.PrintReport()
     nodefault
Also it would be better to use form's methods instead of buttton's Click event.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform