>>>I my EXE program, I am using the Cut and Paste features. I can
>>>Cut/Paste from my EXE program to the Notepad, but I can not
>>>Cut/Paste from one field to another and I can not Cut/Paste from
>>>an outside program (NotePad) into my EXE. Why is wrong?
>>
>>You need to have the system menu bar defined in a popup somewhere, even if it is 'hidden'.
>>
>>Try some code like they following. Note the use of the new VFP sys call (1500)
>>
>> IF CNTBAR("_MEDIT") = 0
>> DEFINE POPUP _MEDIT
>> ENDIF
>>
>> DEFINE BAR _med_paste OF _MEDIT PROMPT "Paste" KEY "Ctrl+V"
>>
>> = SYS(1500,"_med_paste","_medit")
>>
>>
>>Bob
>
>thanks Bob for the code... I am not sure where to put this code?
>I want to mark(highlight) data in a field and paste it to another field
>on the same FORM. thanks rob
The simple test I used to get this to work is in the init of a simple form (two textboxes) I added
SET SYSMENU TO
*-- clear the standard menu so edit options are NOT available
IF CNTBAR("_MEDIT") = 0
DEFINE POPUP _MEDIT
ENDIF
DEFINE BAR _med_copy OF _MEDIT PROMPT "Copy" KEY "Ctrl+C"
DEFINE BAR _med_paste OF _MEDIT PROMPT "Paste" KEY "Ctrl+V"
*-- now copy and paste worked between the text boxes
*-- if you comment the above code in the init, copy and paste DO NOT work
In the destroy method add
SET SYSMENU TO DEFAULT
Bob
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement