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
 Copy and paste objects

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
superdev Posted - Aug 31 2019 : 20:51:36
You are using ImageEnvert.
When you select an object, you copy and paste it,
The selected object is not copied.
ImageEnvert's image is copied.
I want to copy and paste the selected object to the clipboard.
The sauce I used is as follows.

procedure TfrmMain.imgViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  if ((ssCtrl in Shift) and (key=ord('C'))) then begin
    imgView.ObjCopyToClipboard;
  end else if ((ssCtrl in Shift) and (key=ord('V'))) then begin
    imgView.UnSelAllObjects;
    imgView.ObjPasteFromClipboard(MousePos.X,MousePos.Y);
    imgView.Update;
  end;
End;
4   L A T E S T    R E P L I E S    (Newest First)
superdev Posted - Sep 03 2019 : 01:36:45
Thank you for your prompt reply.
"Key=0" was used for normal operation.
However, due to the mouse position value of the lower mouse by mistake,
Bitmap location has been copied out.



procedure TfrmMain.imgViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  if ((ssCtrl in Shift) and (key=ord('C'))) then 
  begin
    imgView.ObjCopyToClipboard;
    Key := 0;
  end 
  else 
  if ((ssCtrl in Shift) and (key=ord('V'))) then 
  begin
    imgView.UnSelAllObjects;
    imgView.ObjPasteFromClipboard(MousePos.X,MousePos.Y);
    imgView.Update;
    Key := 0;
  end;
End;
xequte Posted - Sep 02 2019 : 01:06:21
Hi

I think the Ctrl+C is being handled elsewhere by ImageEn.

Did this not work?

procedure TfrmMain.imgViewKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  if ((ssCtrl in Shift) and (key=ord('C'))) then 
  begin
    imgView.ObjCopyToClipboard;
    Key := 0;
  end 
  else 
  if ((ssCtrl in Shift) and (key=ord('V'))) then 
  begin
    imgView.UnSelAllObjects;
    imgView.ObjPasteFromClipboard(MousePos.X,MousePos.Y);
    imgView.Update;
    Key := 0;
  end;
End;

How about removing loKeyboardShortcuts from ImageEnVect1.LayerOptions?

Nigel
Xequte Software
www.imageen.com
superdev Posted - Sep 01 2019 : 21:05:48
The code below will operate normally. There is a problem with the keyboard.


procedure TfrmMain.btnCopyClick(Sender: TObject);
begin
  imgView.ObjCopyToClipboard;
end;

procedure TfrmMain.btnPasteClick(Sender: TObject);
begin
  imgView.UnSelAllObjects;
  imgView.ObjPasteFromClipboard(MousePos.X,MousePos.Y);
  imgView.Update;
end;
xequte Posted - Sep 01 2019 : 19:36:33
Hi

Does it only happen with the Ctrl+C shortcut? E.g. works correctly if you put imgView.ObjCopyToClipboard; in a button click?

If so, try setting Key := 0; in your code above.

Nigel
Xequte Software
www.imageen.com