Disable copy/cut/past from Tedit

how can diable cut/copy/paste and even "color" text for such an operation on Tedit component ?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This is an example for COPY. Figure out what it does and do the same for cut and paste. write the following:

procedure TForm1.FormCreate(Sender: TObject);
  Application.OnMessage := AppMessage;

procedure TForm1.AppMessage(var Msg: TMsg; var Handled: Boolean);
if (Msg.hwnd = edit1.Handle) and //if the focus is in the edit1
   (Msg.Message=WM_KEYDOWN) and //if the user pressed a key
   ((Msg.wParam = 67) OR (Msg.wParam = 99)) then //if C or c was pressed
    if GetKeyState(VK_CONTROL) < 0 then  //if control key is down            
    showmessage('copy is canceled');
    Handled := True;//cancel the copy action


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
asiAuthor Commented:
10x alot its help me to get to my target

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.