Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp50 - Cut and Paste?
Message
De
27/05/1997 12:58:35
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
22/05/1997 08:46:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00033165
Message ID:
00033721
Vues:
43
>>>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
Fil
Voir

Click here to load this message in the networking platform