Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shortcut keys in menus
Message
De
20/11/2005 13:10:47
 
 
À
17/11/2005 23:33:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Divers
Thread ID:
01068891
Message ID:
01070633
Vues:
17
Bernard --

Not sure what you're trying to tell me here. I've tried using "Clear Macros", to no effect.

Jim

>James
>
>Something else is going on here. I just created a macro for F4 function key which just does a Wait window "You pressed F4"
>and created this menu below:
>
>SET SYSMENU TO
>SET SYSMENU AUTOMATIC
>
>DEFINE PAD _1nx0uw48p OF _MSYSMENU PROMPT "File" COLOR SCHEME 3 ;
> KEY ALT+F, ""
>ON PAD _1nx0uw48p OF _MSYSMENU ACTIVATE POPUP file
>
>DEFINE POPUP file MARGIN RELATIVE SHADOW COLOR SCHEME 4
>DEFINE BAR 1 OF file PROMPT "Open" ;
> KEY F4, "F4" ;
> MESSAGE "hellllllp F4 is nor working"
>ON SELECTION BAR 1 OF file do nothing.prg
>
>
>
>Now if I run this above menu with the macro in use, I can never access the menu with F4 and a wait window keeps popping up with "You pressed F4"
>
>If I issue Clear Macros and then run the same menu, now pressing F4 gives me an error message that it cannot find nothing.prg. which means that the menu shortcut is working.
>
>Try this and see if you get the same results as I get.
>
>Bernard
>
>>Bernard --
>>
>>Since none of my keyboard shortcuts are working, I tried your #2 first. I put "clear macros" immediately before DO MyMenu.MPR. No changee; function keys still have no effect.
>>
>>Any other suggestions?
>>
>>>>I have a menu (using MODIFY MENU) to replace the system menu in my application. This menu, through some forgotten magic, becomes part of my top-level form.
>>>>
>>>>I have two questions; I assume the answers are related:
>>>>1) Cut/Copy/Paste (Ctrl-XCV) don't work, presumably because they do not appear in my menu. How do I add them?
>>>>2) I'd put some items in that have shortcuts (F2, F3, etc), which are listed when I dropdown the menu. However, pressing the indicated function keys do nothing. What am I missing?
>>>>
>>>>Thanks in advance,
>>>
>>>1. To add Cut/copy/paste the easiest is to create a new mwnu and before doing anything else select Menu/QuickMenu. Then open the EDIT section and use the definitions there in your menu.
>>>
>>>eg for Copy:
>>>
>>>Prompt = \>>>Result = Bar #
>>>Menuitem = _med_copy
>>>
>>>Click the small button under Options:
>>>Propmt Options Dialog Box:
>>>
>>>Key Label = CTRL+C
>>>Key Text = CTRL+C
>>>Message = "Copies the selection onto the Clipboard"
>>>Picture
>>>Select Resource radio button
>>>value of text box = _med_copy
>>>
>>>This will give you Copy. Similar for Cut/Paste.
>>>
>>>2. The reason your F2/F3 etc keys don't work from the menu is because you have Macros associated with those keys. Macros take precedence over shortcut keys.
>>>
>>>Just before you DO MyMenu.MPR place this code:
>>>
>>>CLEAR MACROS
>>>
>>>Your Menu shortcut keys will now work both in the IDE and the EXE.
>>>
>>>HTH.
>>>
>>>BErnard
Jim Nelson
Newbury Park, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform