[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Copy/Paste to Clipboard

Posted on 2001-08-16
8
Medium Priority
?
340 Views
Last Modified: 2010-04-06
I have a memo box and a few menu items such as Copy, Cut, Paste, etc.

I would like to know how to copy and paste these items to and from clipboard.

Actually I already got paste to work, but copying the selected text to clipboard, I can't get to work.

0
Comment
Question by:aussie_guy_nik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 6

Accepted Solution

by:
MannSoft earned 200 total points
ID: 6393330
so long as text is selected, Memo1.CopyToClipboard should work.
0
 
LVL 1

Expert Comment

by:krainey
ID: 6393341
Take a look at sending the WM_CUT, WM_PASTE, WM_COPY  messages to the control.
0
 
LVL 6

Expert Comment

by:edey
ID: 6393910
You can also try:

clipBoard.asText := memo1.selText;

or even:

var
 str : pchar;
...
str := memo1.selText;
clipBoard.setTextBuf(str);

For assigning other sorts of data to the clipBoard you can try:

clipBoard.assign(image1.picture.bitmap);

There are many ways to do this, I sugest checking out the help files might be a good idea.

GL
Mike
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:aussie_guy_nik
ID: 6395744
edey

clipboard is not reserved object. isn't there a reserved clipboard object in windows which can be accessed.

tclipboard has to be declared, and I don't know how that's supposed to work.

thanks
0
 
LVL 6

Expert Comment

by:edey
ID: 6395872
TClipboard is globally declared in clipbrd.pas, so you just have to add clipbrd to your uses clause, you don't even have to instantiate it.

GL
Mike
0
 

Author Comment

by:aussie_guy_nik
ID: 6399666
actually, I figured it out. there seems to be a simpler way to do all this, which unfortunatelly was not provided in any of the answers, so i am deleting this question.
0
 

Author Comment

by:aussie_guy_nik
ID: 6399668
the simple answer, which seems to work is

memSQL.CopyToClipboard

memSQL.PasteFromClipboard
0
 
LVL 6

Expert Comment

by:MannSoft
ID: 6399921
I told you to use CopyToClipboard in the first reply...but if you want to delete the question go ahead
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question