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
 Drag and drop between programs
 New Topic  Reply to Topic
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

graph_man

326 Posts

Posted - Oct 03 2018 :  15:15:47  Show Profile  Reply
How to make Drag and drop between ImageEnMView in two programs?

From ImageEnMView (program 1) to ImageEnMView (program 2).

xequte

38180 Posts

Posted - Oct 03 2018 :  16:24:32  Show Profile  Reply
Hi

Standard drag-drop does not work between programs. If you are looking to do Windows style drag drop (files could be dropped to and from Windows as well as your ImageEnMView) then you can just use a TImageEnFolderMView (treat it like a TImageEnView):

https://www.imageen.com/help/TImageEnFolderMView.html

Otherwise there are examples online about dragging and dropping between programs in a generic way.

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

graph_man

326 Posts

Posted - Oct 03 2018 :  17:03:58  Show Profile  Reply
I need to drag-and-drop selected pages from ImageEnMView (program 1) to ImageEnMView (program 2).
Go to Top of Page

xequte

38180 Posts

Posted - Oct 03 2018 :  18:56:10  Show Profile  Reply
Yes, that is what I am describing.

Are they regular files being dragged, or images that are specific to your application (i.e. is it OK for you to use Windows style drag and drop of files)?


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

graph_man

326 Posts

Posted - Oct 03 2018 :  20:05:50  Show Profile  Reply
How to drag-and-drop images?
Any advice would be appreciated.
Go to Top of Page

xequte

38180 Posts

Posted - Oct 07 2018 :  17:34:16  Show Profile  Reply
I have used this component in the past. It is good:

http://melander.dk/delphi/dragdrop


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

graph_man

326 Posts

Posted - Oct 07 2018 :  18:27:03  Show Profile  Reply
There are problems with installing on Builder XE7
Go to Top of Page

graph_man

326 Posts

Posted - Oct 11 2018 :  16:22:09  Show Profile  Reply
How to exclude simultaneous triggering of dragging inside ImageEnMView and outside (from ImageEnMView to other program)?
Go to Top of Page

xequte

38180 Posts

Posted - Oct 11 2018 :  16:37:38  Show Profile  Reply
There should be no drag triggering in components as long as DragMode = dmManual.

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

graph_man

326 Posts

Posted - Oct 12 2018 :  05:26:56  Show Profile  Reply
How to use 2 drag-and-dropn in the program?
1 - inside ImageEnMView (ImageEn)
2 - outside ImageEmMView (third-party component)

ps
Why drag-and-drop (ImageEn) is not canceled when the mouse moves over the border ImageEnMView?
How to do it?
Go to Top of Page

xequte

38180 Posts

Posted - Oct 12 2018 :  19:13:57  Show Profile  Reply
Hi

Dragging to/from TImageEnView from/to a third party component (within the same application) is shown using the DragDrop demos in the \Multi\ folder.

I'm not sure what you mean about the cancelling. Drag drop behavior is dictated by the VCL, not by TImageEnMView, though you should use the methods IEBeginDrag/IEEndDrag to address some internal requirements:

https://www.imageen.com/help/TImageEnMView.IEBeginDrag.html



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

graph_man

326 Posts

Posted - Oct 12 2018 :  19:51:29  Show Profile  Reply
> I'm not sure what you mean about the cancelling.

I want to cancel drag-and-drop when the mouse moves over the border ImageEnMView.

> you should use the methods IEBeginDrag/IEEndDrag

I use IEBeginDrag/IEEndDrag.

I tried to add IEEndDrag in ImageEnMViewMouseLeave but this event works incorrectly.
Go to Top of Page

yogiyang

India
725 Posts

Posted - Oct 18 2018 :  06:45:45  Show Profile  Reply
Hello,

If you are using JCL and JVCL then try the drag and drop component. I think it will help you achieve what you want.

Regards,


Yogi Yang
Go to Top of Page

graph_man

326 Posts

Posted - Oct 18 2018 :  06:49:29  Show Profile  Reply
This component allows to get files only (but not transfer).
Go to Top of Page

w2m

USA
1990 Posts

Posted - Oct 18 2018 :  08:55:18  Show Profile  Reply
If you have a filename when dropping just call IO.LoadFromFile(Filename);

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

graph_man

326 Posts

Posted - Oct 18 2018 :  14:07:48  Show Profile  Reply
I need to drag-and-drop image (Bitmap) from ImageEnMView (program1) to ImageEnMView (program2).
Go to Top of Page

w2m

USA
1990 Posts

Posted - Oct 18 2018 :  14:24:09  Show Profile  Reply
I thought you said you were using a Drag And Drop component to achieve the Drag from App 1 and you had a filename from the Drag and Drop component in App 2. Is this correct?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

graph_man

326 Posts

Posted - Oct 18 2018 :  14:37:44  Show Profile  Reply
No.
I have 2 applications with ImageEnMView and I need to drag-and-drop pages (from ImageEnMView) between these applications.
Go to Top of Page

xequte

38180 Posts

Posted - Oct 18 2018 :  15:48:30  Show Profile  Reply
Hi

Your options are:

- Use COM to drag and drop, e.g. via a component:

http://melander.dk/delphi/dragdrop


- Save the bitmap to a temp file from program1 when dragging commences, then use standard Windows drag and drop to allow the file to be dropped into another application (e.g. program2). The advantage of this method is that it is already available in ImageEn and will allow the dragging and dropping code to work with third party programs too.


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

graph_man

326 Posts

Posted - Oct 18 2018 :  16:11:44  Show Profile  Reply
> - Save the bitmap to a temp file from program1 when dragging commences,
> then use standard Windows drag and drop to allow the file to be dropped
> into another application (e.g. program2).

Thank you.
Could you write small example?
Go to Top of Page

w2m

USA
1990 Posts

Posted - Oct 18 2018 :  16:15:13  Show Profile  Reply
Nigel,

I can not get the Melander DragAndDrop component to compile with Delphi Tokyo. This component is quite old. There is some pretty simple code to load images from Windows Explorer in a Target app using procedure WMDropFiles(var Msg: TWMDropFiles); message wm_DropFiles; but I do not know how to implement something similar with ImageEn and Windows messages to allow initation of the com drag from the source app.

If we can come up with a simple way to initiate the dragging from imageen to a com drag and drop object a com component would not be required to achieve this.

I do not know of any freeware com drag and drop components that compile with the latest Delphi versions, so users are left with purchasing commercial components to achieve this. The most inexpensive I have found is LMD at $59.00.
Most recently I used the Raize DragAndDrop component but that is $99 now.

So... we have some simple code to accept the drop in a target app but I have been unable to find some code that initiates the com drag from the source app.

Any ideas?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
Jump To: