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);
begin
// Komponen TApplicationEvents -> OnMessage
if Msg.Message = WM_RBUTTONDOWN then Handled := True;
end;

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

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: