Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Use API to Cut Text to Clipboard
Message
 
To
01/06/2004 14:30:15
Donald Lowrey
Data Technology Corporation
Las Vegas, Nevada, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00908986
Message ID:
00909044
Views:
14
You can use _CLIPTEXT to deal with the clipboard directly in code.
* put text in the clipboard
_CLIPTEXT="My String"

* read text from the clipboard
MyVar=_CLIPTEXT
HTH :-)

>Hi All
>
>The goal is to allow the user to select text and then progrmatically remove the text and place it on the clipboard, where it will undergo further processing.
>
>You might say, ah Ha!, just use KEYBOARD '{CTRL+X}'. That won't work, because it is not reliable. The short cut key combintation depends on the existance of a menu with that shortcut; which may not always be the case. Also, if something else is already on the clipboard, there is another problem. I need to be able to manipulate only my user's selected text. I have had problems when Windows appears to cycle through the "stack" of items on the clipboard. Using _CLIPTEXT doesn't solve this problem.
>
>I have figured out the Win API functions well enough to Open, close and clear the clipboard, and to manipulate text that has already been cut.
>
>Where I need help is in using the API to actually cut the text after the user has selected it.
>
>Thanks in advance for your help.
>
>Regards
>Don Lowrey
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform