Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to HIDE menu but keep CTRL-KEYS functioning in memor
Message
From
18/10/1998 01:01:16
 
 
To
17/10/1998 16:49:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00146939
Message ID:
00147901
Views:
43
>>What I really want to do is have "CUT" and "PASTE" available in my program, but I don't want a menu at the top of my screen. Those "in-the-know" tell me that I should use the "EDIT" portion of the menu setup program that includes Cut and Paste. It works great, but I have a menu at the top of my screen. If I use the "HIDE MENU" command, it tells me that I did not create it with "DEFINE MENU" and it won't work. Do you know of anyway to get the function of "CUT" and "PASTE" without using the MENU BUILDER and issuing a "DO MENU.MPR"?
>>I'm using Visual-FoxPro 5.0 now, but I have the new 6.0 and just have not installed it yet. Maybe it has an answer to my "problem", oops, I mean my "opportunity for solution"; got to stay positive!
>>
>>Thanks for the reply...
>
>Well, you actually don't have to have the menu at all. You can do it all in the KeyPress method of a control (EditBox or TextBox):
>
>case nKeyCode ...(crtl+x)
> _cliptext=this.SelText
> this.SelText=""
>Case (ctrl+c)
> _cliptext=this.SelText
>Case (ctrl+v)
> this.SelText= _cliptext
>Case....
>
>Just like that. No need for menus.

But menus make this behavior universal for all entry controls, with no code to be dispersed in every instance or class definition. I have used your method when I want this behavior on a limited scale, but it's not very practical for an entire app, or even an entire form.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform