ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to disable CTRL+C only in a specific TImageEnView?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - Feb 28 2024 : 11:50:49
It seems that disabling CTRL+C for Clipboard Copy in TImageEnView is possible only globally:

IEGlobalSettings().KeyboardShortcuts[iesCopy] := 0;


But I have several TImageEnView in my application on different forms, and I want to disable CTRL+C only in one of them; how can I do that?

A KeyDown event handler does not disable CTRL+C in TImageEnView:

procedure TformPreview.ImageEnViewPreviewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  if (Shift = [ssCtrl]) then 
  begin
    case Key of
      VK_C:
        begin
          CodeSite.Send('TformPreview.ImageEnViewPreviewKeyDown: ');
        end;
    end;
  end;
end;
2   L A T E S T    R E P L I E S    (Newest First)
PeterPanino Posted - Feb 29 2024 : 10:43:29
Hi Nigel

Thanks, this helps.
xequte Posted - Feb 28 2024 : 14:18:18
Hi Peter

This works in my testing to disable Copy for a particular TImageEnView:

procedure TMainForm.ImageEnView1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  if ( Shift = [ssCtrl]) and (Key = VK_C ) then
    Key := 0;
end;


Otherwise, you can disable shortcuts for a specific TImageEnView by removing loKeyboardShortcuts from LayerOptions:

https://www.imageen.com/help/TImageEnView.LayerOptions.html



Nigel
Xequte Software
www.imageen.com