Can it be done?

--
iTech Consulting Co., Ltd.
Website: http://www.itech.com.hk (IE only)
Tel: (852) 2325 3883 Fax: (852)2325 8288

Re: [VFP 5] Enabling cut-and-paste without set sysmenu on by Bernhard

Bernhard
Fri Oct 27 05:03:35 CDT 2006

Hi Man-wai Chang,

just try:
only DEFINE a popup with those BARs (_MED_CUT _MED_COPY _MED_PASTE), don't show it.

Regards
Bernhard Sander

Re: [VFP 5] Enabling cut-and-paste without set sysmenu on by Man-wai

Man-wai
Fri Oct 27 05:09:58 CDT 2006

> just try:
> only DEFINE a popup with those BARs (_MED_CUT _MED_COPY _MED_PASTE),
> don't show it.

I followed this link:
http://www.dbmonster.com/Uwe/Forum.aspx/foxpro-forms/946/Find-Replace

I put DEFINE POPUP codes in form.init() as well as form.paint(). It
didn't work. CTRL-X didn't cut.

The trick does work in VFP 9. SO I wonder whether I needed something
special for 5.

--
iTech Consulting Co., Ltd.
Website: http://www.itech.com.hk (IE only)
Tel: (852) 2325 3883 Fax: (852)2325 8288

Re: [VFP 5] Enabling cut-and-paste without set sysmenu on by Man-wai

Man-wai
Fri Oct 27 05:26:39 CDT 2006

> I followed this link:
> http://www.dbmonster.com/Uwe/Forum.aspx/foxpro-forms/946/Find-Replace

The codes I tried:

DEFINE POPUP _medit MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR _med_undo OF _medit PROMPT "\<Undo" ;
KEY CTRL+Z, "Ctrl+Z" ;
MESSAGE "Undoes the last command or action"
DEFINE BAR _med_redo OF _medit PROMPT "Re\<do" ;
KEY CTRL+R, "Ctrl+R" ;
MESSAGE "Repeats the last command or action"
DEFINE BAR _med_sp100 OF _medit PROMPT "\-"
DEFINE BAR _med_cut OF _medit PROMPT "Cu\<t" ;
KEY CTRL+X, "Ctrl+X" ;
MESSAGE "Removes the selection and places it onto the Clipboard"
DEFINE BAR _med_copy OF _medit PROMPT "\<Copy" ;
KEY CTRL+C, "Ctrl+C" ;
MESSAGE "Copies the selection onto the Clipboard"
DEFINE BAR _med_paste OF _medit PROMPT "\<Paste" ;
KEY CTRL+V, "Ctrl+V" ;
MESSAGE "Pastes the contents of the Clipboard"


--
iTech Consulting Co., Ltd.
Website: http://www.itech.com.hk (IE only)
Tel: (852) 2325 3883 Fax: (852)2325 8288

Re: [VFP 5] Enabling cut-and-paste without set sysmenu on by Bernhard

Bernhard
Fri Oct 27 06:59:50 CDT 2006

Hi Man-wai Chang,

>> just try:
>> only DEFINE a popup with those BARs (_MED_CUT _MED_COPY _MED_PASTE),
>> don't show it.
>
>
> I followed this link:
> http://www.dbmonster.com/Uwe/Forum.aspx/foxpro-forms/946/Find-Replace
>
> I put DEFINE POPUP codes in form.init() as well as form.paint(). It
> didn't work. CTRL-X didn't cut.
>
> The trick does work in VFP 9. SO I wonder whether I needed something
> special for 5.
>
Maybe instead of SET SYSMENU OFF try something like this:

SET SYSMENU TO _medit
PUSH MENU _msysmenu
FOR i = 1 TO cntpad("_msysmenu")
RELEASE PAD (getpad("_msysmenu", 1)) of _msysmenu
ENDFOR

Don't forget to POP MENU _msysmenu when you quit the app.

Regards
Bernhard Sander

Re: [VFP 5] Enabling cut-and-paste without set sysmenu on by Dan

Dan
Fri Oct 27 10:57:03 CDT 2006

It worked in VFP3. (Heck, it worked in FPW.)

You do not need the menus activated, but they must be defined.

>CTRL-X didn't cut.

Did you have text selected?

Dan

Man-wai Chang wrote:
>> just try:
>> only DEFINE a popup with those BARs (_MED_CUT _MED_COPY _MED_PASTE),
>> don't show it.
>
> I followed this link:
> http://www.dbmonster.com/Uwe/Forum.aspx/foxpro-forms/946/Find-Replace
>
> I put DEFINE POPUP codes in form.init() as well as form.paint(). It
> didn't work. CTRL-X didn't cut.
>
> The trick does work in VFP 9. SO I wonder whether I needed something
> special for 5.



Re: [VFP 5] Enabling cut-and-paste without set sysmenu on by Man-wai

Man-wai
Sat Oct 28 07:37:57 CDT 2006

> Maybe instead of SET SYSMENU OFF try something like this:
>
> SET SYSMENU TO _medit
> PUSH MENU _msysmenu
> FOR i = 1 TO cntpad("_msysmenu")
> RELEASE PAD (getpad("_msysmenu", 1)) of _msysmenu
> ENDFOR
>
> Don't forget to POP MENU _msysmenu when you quit the app.

Thanks. Will try it next Tuesday (public holiday on Monday in Hong Kong).

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06) Linux 2.6.18
^ ^ 20:37:01 up 3 days 17:42 0 users load average: 1.07 1.04 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: [VFP 5] Enabling cut-and-paste without set sysmenu on by Man-wai

Man-wai
Sat Oct 28 07:37:20 CDT 2006

> It worked in VFP3. (Heck, it worked in FPW.)
> You do not need the menus activated, but they must be defined.
> Did you have text selected?


Yes. I had text hilited. hmm.. :)

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 6.06) Linux 2.6.18
^ ^ 20:36:01 up 3 days 17:41 0 users load average: 1.10 1.04 1.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: [VFP 5] Enabling cut-and-paste without set sysmenu on by Man-wai

Man-wai
Mon Oct 30 21:21:26 CST 2006

> Maybe instead of SET SYSMENU OFF try something like this:
> SET SYSMENU TO _medit
> PUSH MENU _msysmenu
> FOR i = 1 TO cntpad("_msysmenu")
> RELEASE PAD (getpad("_msysmenu", 1)) of _msysmenu
> ENDFOR

I have just tried it. It worked as long as I don't SET SYSMENU OFF. I
don't think my supervisor would take the idea of not turning off SYSMENU.

--
iTech Consulting Co., Ltd.
Website: http://www.itech.com.hk (IE only)
Tel: (852) 2325 3883 Fax: (852)2325 8288