Link to home
Start Free TrialLog in
Avatar of marksmall
marksmall

asked on

lock and unlock clipboard

how can i lock and unlock the clipboard in code?

thanx

marc
ASKER CERTIFIED SOLUTION
Avatar of ginsonic
ginsonic
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or ........

To copy something there has to be a selection, otherwise there is nothing to copy. So attach a handler to the controls OnSelectionChange event. This handler contains the line:

with Sender as TRichEdit do // put here your component
  SelLength := 0;


something like :

var
yourLock:Boolean;

if yourLock then
 with Sender as TEdit do
  SelLength := 0;
Avatar of marksmall
marksmall

ASKER

SORRY ABOUT DELAY, BEEN POORLY AND COULD GET ACCESS TO MY COMPUTER!