This sounds like an issue of focus. Since the button is the currently active control when you click it, there is nothing to cut. You must first setfocus() to the previous object,
then paste. You can do this by adding an oLastObject property to the form to hold the object reference.
In the
when of your button, set the reference using:
ThisForm.oLastObj = ThisForm.ActiveControl
In the
click of the button:
ThisForm.oLastObj.SetFocus()
SYS(1500, '_MED_CUT', '_MEDIT')
And finally, in the
QueryUnload (or other suitable method):
thisform.oLastObj = .NULL.
return .t.
>Hello,
>
>We are using VFP 5.0a. In our menu we have added the Cut, Copy and Paste bar#.
>Now we want to execute these commands in our toolbar. We added the following line to our CLICK() event from the CUT button:
>SYS(1500,"_MED_CUT","_MEDIT")
>Normally this should work but alas it doesn't.
>Could somebody tell us what we might be doing wrong?
kenweber
GCom2 Solutions
Microsoft Certified Professional