Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy and Paste behaviour

Status
Not open for further replies.

LindaRichard

Programmer
Feb 23, 2001
103
CA
Have any of you ever had this problem?

For some odd reason on one machine the copy paste is not working properly
eventhough it had been working fine in the past.
When I start the application I can copy/paste between text boxes
without a problem but then after a little while it will not work anymore.

I open another application such as excel and I can copy and paste.
Go back to my vfp application and it still doesn't work.

The only way I can get it to work again, is shut down the computer, and then
the same behaviour returns, after a short while I can't copy and paste from
one text box to the other.

Same application on another computer, working fine.
By the way they are running with Windows 2000 pro.

Any suggestions apreciated.

Thanks
Linda
 
As a matter of fact, as strange as it sounds, I have also had this behavior. The only thing I could narrow it down to was somehow the message/keyboard translation between Fox and windows gets 'hosed'. I could never resolve it without rebooting (cold) the computer.
I personally haven't defined any ON KEY LABEL.... or macros such as Ctrl-C or Ctrl-V, so I know it's not an application issue.


Dave S.
[cheers]
 
Thank for your reply,

I don't have any ON KEY definitions either anywhere in my application. So I am still trying to figure out what is going on.

Thanks
Linda
 
Linda and Dave,

I too have noticed this behaviour occasionally, except in my case it only happened when I was copying from IE into VFP.

Which version of VFP are you using? Mine is 7.0 without a service pack.

Mike


Mike Lewis
Edinburgh, Scotland
 
Linda,
For these to work, these hot keys must be defined in a current Menu - either the application system menu or a popup menu (it's got to be active, although it can be hidden). Also, if it's in the system Menu, then you can't be in a modal form.

Rick
 
Thanks for your reply,

I have a menu called menuiso.mpr

In the menu there are three items called cut,copy, paste
for each there are defined keys CTRL+X, CTRL+C and CTCL+V
Which call, _med_cut, _med_copy, and med_paste.

In my main.prg I set up the menu using the call
DO menuiso.mpr

The problem occurs after I have loaded a Modal form several times and
return to my main editing form, the copy, paste funcitons don't work
anymore. The problem occurs irregularly. For example, here is a sequence of
events.

Main form (cut/paste works)
Load modal form (do a search, unload form)
return main form (cut/paste works)
Load modal form again (do same search, unload form)
return main form (cut/paste works)
Load modal form again (do same search, unload form)
return main form (cut/paste work doesn't work!?!)

The problem seems to be related to loading a modal form and it
disabling the copy/paste keys. It can occur after the 1st time I load the
form or the 10th.
Any suggestions on how I can get this to work?

Thanks
Linda

 
Linda,

The problem occurs after I have loaded a Modal form several times

That sounds like you've got code in your base modal form class to disable the menus. That's not unusual. Because modal forms in VFP aren't really modal, some developers explicitly disable menus, toolbars and _SCREEN close buttons when they activate a modal form. The trouble is, the disabled items don't always get re-enabled.

I suggest you look at the code in the Init, Load or Activate events of all your modal forms, and - importantly - in all the classes on which those forms are based.

This sort of thing is especially a problem when you are using other people's classes and you are not fully aware of the side effects.

Mike


Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top