Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invisible buttons hot key
Message
De
24/10/2008 00:08:42
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
23/10/2008 13:30:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01356027
Message ID:
01356802
Vues:
30
Denis
dobroje utro

Then one good thing I could tell you that is it simple to avoid the listen events on unvisible Pageframes.
Every object has an UIENABLE event.
HELP UIENABLE
If it receives .T., BIND your objects, if it receives .F. UNBIND. So there is no need to bind all objects in forms init.

The problem is that you need to figure out which page is first. One way would be to
lnPage = pageframe.ACTIVEPAGE
pageframe.ACTIVEPAGE = 0
pageframe.ACTIVEPAGE = lnPage
in your forms init.

It may also speed up if you avoid the ASCAN. Think about a ASSIGN to CAPTION that reads those number and store it to a property, so the "CatchKey_Event" need only to compare two numbers. This will work much faster. In this case I would create the array only in the ASSIGN. Since the ASSIGN will not work for propertys set in the designer you would need a
THIS.CAPTION = THIS.CAPTION
line in buttons init

BTW

Do buttons in Office receive KEYPRESS or are they toolbars? A toolbar object normaly does not receive a keypress ....

Agnes
>Hi Agnes,
>Yes.. the idea with BindEvents() is quite good.. I thinking it will work.
>I just thinking.. how many buttons will listen the same keypress event.. 20... 50.. each keypress willl fair catch_keypress in 50 buttons.. every button will check if its the keycode whats neccessary...... hmmm..
>Now.. lets think.. user type text in Editbox.. what will happens in system.. each key press will far 50 events.. where 50 methods will check hot keys..What's happens with performance?
>and for example.. our application using Pageframe as host for containers.. sometimes its 27 pages.. each 27 pages has buttons.. maybe.(maybe) on page 1.. exist button with hot key "S"... and on page10 also.. and on page12 also..
>Can you imagine whats heppens then?! :))))
>
>The code what I writing - its a code for restyle existing application.. just lifting of interface, make it more modern and beauty..
>So far.. I thinking.. your solution will works.. but.. but past of this solution might be on my look more horrible then advantage :)))
>
>Denis
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform