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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to select region and copytoclip in imageenmvi
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

shxwinner

4 Posts

Posted - Mar 08 2014 :  01:44:28  Show Profile  Reply
I want to select a region and copy this region to clipboard in imageenMviewer, help me .thanks#65281;

shxwinner

4 Posts

Posted - Mar 08 2014 :  02:05:04  Show Profile  Reply
imgMview.Proc.SelCopyToClip(True);
cannot copy selection region to clipboard#65292;it copy one image all to clipboard#65292;why#65311;
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 08 2014 :  10:22:09  Show Profile  Reply
Based on your comments it looks like you want to copy the selected image to the clipboard. ImageEnMView does not allow rubberband selections so you can not copy a selected area of a thumbnail to the clipboard with TImageEnMView.

If you want to copy the selected TImageEnMView thumbnail to the clipboard then do this:
procedure TForm1.CopySelectedImageToClipboard1Click(Sender: TObject);
{ Copy the selected image or thumbnail to the clipboard. }
begin
  ImageEnMView1.Proc.CopyToClipboard(True);
end;

To copy a region of the image to the clipboard, add a TImageEnView to your form, set its MouseInteract to miSelect, copy the image from TImageEnMView to TImageEnView, make a selection in TImageEnView, then copy the TImageEnView selection to the clipboard as shown below:
procedure TForm1.FormCreate(Sender: TObject);
{ Set TImageEnView.MouseIntract to selection. }
begin
  ImageEnView1.MouseInteract := [miSelect];
end;

procedure TForm1.ImageEnMView1ImageSelect(Sender: TObject; idx: Integer);
{ Copy the selected image from ImageenMView1 to ImageEnView. }
begin
  ImageEnView1.IEBitmap.Assign(ImageEnMView1.GetTIEBitmap(idx));
  ImageEnMView1.ReleaseBitmap(idx);
  ImageEnView1.Update;
end;

Now when the image is in ImageEnView then make a selection and copy the selection to the clipboard.
procedure TForm1.CopySelection1Click(Sender: TObject);
{ Copy selected area to the clipboard. }
begin
  if ImageEnView1.Selected then
    ImageEnView1.Proc.SelCopyToClip(True);
end;

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: