Author |
Topic |
graph_man
326 Posts |
Posted - Oct 03 2018 : 15:15:47
|
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
|
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 |
|
|
graph_man
326 Posts |
Posted - Oct 03 2018 : 17:03:58
|
I need to drag-and-drop selected pages from ImageEnMView (program 1) to ImageEnMView (program 2). |
|
|
xequte
38180 Posts |
Posted - Oct 03 2018 : 18:56:10
|
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
|
|
|
graph_man
326 Posts |
Posted - Oct 03 2018 : 20:05:50
|
How to drag-and-drop images? Any advice would be appreciated. |
|
|
xequte
38180 Posts |
|
graph_man
326 Posts |
Posted - Oct 07 2018 : 18:27:03
|
There are problems with installing on Builder XE7 |
|
|
graph_man
326 Posts |
Posted - Oct 11 2018 : 16:22:09
|
How to exclude simultaneous triggering of dragging inside ImageEnMView and outside (from ImageEnMView to other program)? |
|
|
xequte
38180 Posts |
Posted - Oct 11 2018 : 16:37:38
|
There should be no drag triggering in components as long as DragMode = dmManual.
Nigel Xequte Software www.imageen.com
|
|
|
graph_man
326 Posts |
Posted - Oct 12 2018 : 05:26:56
|
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? |
|
|
xequte
38180 Posts |
Posted - Oct 12 2018 : 19:13:57
|
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 |
|
|
graph_man
326 Posts |
Posted - Oct 12 2018 : 19:51:29
|
> 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. |
|
|
yogiyang
India
725 Posts |
Posted - Oct 18 2018 : 06:45:45
|
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 |
|
|
graph_man
326 Posts |
Posted - Oct 18 2018 : 06:49:29
|
This component allows to get files only (but not transfer). |
|
|
w2m
USA
1990 Posts |
Posted - Oct 18 2018 : 08:55:18
|
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 |
|
|
graph_man
326 Posts |
Posted - Oct 18 2018 : 14:07:48
|
I need to drag-and-drop image (Bitmap) from ImageEnMView (program1) to ImageEnMView (program2). |
|
|
w2m
USA
1990 Posts |
Posted - Oct 18 2018 : 14:24:09
|
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 |
|
|
graph_man
326 Posts |
Posted - Oct 18 2018 : 14:37:44
|
No. I have 2 applications with ImageEnMView and I need to drag-and-drop pages (from ImageEnMView) between these applications. |
|
|
xequte
38180 Posts |
Posted - Oct 18 2018 : 15:48:30
|
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
|
|
|
graph_man
326 Posts |
Posted - Oct 18 2018 : 16:11:44
|
> - 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? |
|
|
w2m
USA
1990 Posts |
Posted - Oct 18 2018 : 16:15:13
|
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 |
|
|
Topic |
|