Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comment/Uncomment Menu Options
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Divers
Thread ID:
01293366
Message ID:
01293602
Vues:
32
Thanks Sergey,

Now I feel a bit dim for not thinking of the obvious <g>... Actually I never used the key combination like that either instead of the shortcut menu (too much thought in that I guess).

What I really wanted to do was hook up the Visual Studio commenting scheme which is Ctrl-K-C and Ctrl-K-U... OKL doesn't directly work for that however the following seems to do the trick (in a startup program):
ON KEY LABEL CTRL+K do VsStyleComment in PROGRAM()

FUNCTION VsStyleComment

lnKey = INKEY(.5,"HM")
IF lnKey = 3  && Ctrl-C
	KEYBOARD "{ALT+o}m"
ENDIF
IF lnKey = 21  && Ctrl-U
	KEYBOARD "{ALT+o}n"
ENDIF

ENDFUNC
Now my 'comment reflex' is satisfied <g>...

Thanks,

+++ Rick ---


>>Does anybody know if it's possible to fire the Visual FoxPro Comment and Uncomment menu options directly through code?
>>
>>I took a quick look in the available menu command names and I don't see that name unfortunately.
>>
>>I suppose I should have researched this a long time ago but the fact that this action isn't hotkeyed is really annoying especially since the context menu seems to drop off the screen consistently or the selection wants to be moved rather than applying the context against it <g>...
>>
>>Anyway - anybody know how to automate these options?
>
>Hi Rick,
>
>It can be done through KEYBOARD command
>
>* Comment
>KEYBOARD "{ALT+o}m"
>
>* Uncomment
>KEYBOARD "{ALT+o}n"
>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform