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
 Built-in drag&drop?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

993 Posts

Posted - Apr 29 2020 :  17:16:27  Show Profile  Reply
Does TImageEnView have a BUILT-IN feature to drag & drop the displayed image to Windows Explorer (to generate the displayed image as an image file in a predefined format)? So I don't have to write the code for it each time I need this feature.

That would be VERY USEFUL!

PeterPanino

993 Posts

Posted - Apr 29 2020 :  17:54:14  Show Profile  Reply
Found this example in the documentation (TIEFileDragDrop):

Drag Example

// Allow image to be dragged from a TImageEnView (to Windows Explorer, for example)
procedure TForm1.ImageEnView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
  ssFiles: TStringList;
begin
  if GetKeyState(VK_LBUTTON) < 0 then // Mouse left button is down
  begin
    ssFiles := TStringList.Create;
    ssFiles.Text := ImageEnView1.IO.Params.FileName;
    IEFileDragDrop1.InitiateDragging( ssFiles, [iedaCopy] );
    FreeAndNil(ssFiles);
  end;
end;


But it does not work.

How to make it work?
Go to Top of Page

xequte

39142 Posts

Posted - Apr 30 2020 :  04:16:52  Show Profile  Reply
Hi Peter

Just use a TImageEnFolderMView which support drag and drop (you need to enable it).

See the demo, \Multi\FolderMView\FolderMView.dpr for more info.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PeterPanino

993 Posts

Posted - Apr 30 2020 :  04:24:20  Show Profile  Reply
But I NEED to drag & drop from a TImageEnView to Windows Explorer! And the documentation example says "Allow image to be dragged from a TImageEnView (to Windows Explorer, for example)". Is the documentation wrong?
Go to Top of Page

xequte

39142 Posts

Posted - Apr 30 2020 :  17:52:02  Show Profile  Reply
Sorry, I misread your message (our components are two closely named).

Yes, that can be down with TIEFileDragDrop.

I just tested the code and it works fine here. What issues are you having with it?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PeterPanino

993 Posts

Posted - May 01 2020 :  09:13:44  Show Profile  Reply
Thanks Nigel, I meanwhile use TDropFileSource from the Drag-and-Drop-Component-Suite (https://github.com/DelphiPraxis/The-Drag-and-Drop-Component-Suite-for-Delphi).
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: