Board index » delphi » Trapping Ctrl-x Ctrl-v, ctrl-c keystrokes

Trapping Ctrl-x Ctrl-v, ctrl-c keystrokes

I am writing a delphi app that needs to trap these keystrokes in order to
restrict users from copying & pasting text from my app to other programs,
At the moment the clipboard is cleared when the app becomes deactivated,but
I wish to trap these keystrokes for further development. Any Ideas?
Thanks in advance
Peter.

 

Re:Trapping Ctrl-x Ctrl-v, ctrl-c keystrokes


Quote
>   "Peter Phillips" <Pe...@planit.co.uk> writes:
>  I am writing a delphi app that needs to trap these keystrokes in order to
>  restrict users from copying & pasting text from my app to other programs,

Well, set the keyprwview for the form to true and then in the key down event for the form add something like this

  if (shift = [ssCtrl]) and ( key = ???) then key := 0;

I do not have exactly what v, x and c - codes are.

johan

Re:Trapping Ctrl-x Ctrl-v, ctrl-c keystrokes


In article <5k1uj5$...@kew.globalnet.co.uk>, "Peter Phillips"

Quote
<Pe...@planit.co.uk> writes:
>I am writing a delphi app that needs to trap these keystrokes in order to
>restrict users from copying & pasting text from my app to other programs,
>At the moment the clipboard is cleared when the app becomes
deactivated,but
>I wish to trap these keystrokes for further development. Any Ideas?
>Thanks in advance
>Peter.

If you create shortcuts using those keystrokes, your shortcuts will take
priority.  Put those shortcuts on the menu, set that menu segment's
visible property to False.  Then, have the menu items generate appropriate
messages (like a dialog box saying Stop trying to Copy my Info, you Pirate
you...).  Piece of cake.

hth

/js

Other Threads