Mematikan Shortcut Ctrl+C dan Mengontrol Mouse Kanan

Mematikan shortcut ctrl+c
Pada event onKeyPress
if (ssCtrl in Shift) and (chr(Key) in [‘C’, ‘c’]) then key := #0;

megontrol mouse kanan;

1. dengan TapplicationEvent; itu u/ kontrol seluruh form;

procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
// Komponen TApplicationEvents -> OnMessage
if Msg.Message = WM_RBUTTONDOWN then Handled := True;

2.pada memo itu sendiri
procedure TForm1.Memo1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
if Button = mbRight then
ShowMessage(‘Tidak Boleh Klik Kanan’);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: