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
 PasteFilesFromClipboard and IEFolderMView.PasteFilesFromClipboard

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
jrpcguru Posted - Mar 01 2025 : 19:10:50
I'm now using D12.2 and IE 13.7.0

I just discovered that my File Manager program is no longer moving files via CutFilesToClipboard, followed by
IEFolderMView.PasteFilesFromClipboard() or PasteFilesFromClipboard(MainForm.Handle, edtFolder.Text,false, true,true). It only copies, does not move.

If I use CutFilesToClipboard it will correctly paste into File Explorer.

At the same time I discovered it would only copy if Ctrl+X is used in File Explorer then pasted in my program.

That led me to this:

  try
    ssFileNamesOnClipboard := TStringList.Create;
    bHaveFiles := PasteFilesFromClipboard(MainForm.Handle, ssFileNamesOnClipboard, bMoveFiles);
   if bMoveFiles then
       showmessage('Move' + slinebreak + ssFileNamesOnClipboard.Text)
    else
       showmessage('Copy' + slinebreak + ssFileNamesOnClipboard.Text);

  finally
    ssFileNamesOnClipboard.Free;
  end;


This code correctly reports the files copied to the clipboard or cut to the clipboard, using ImageEn. If the clipboard contains a file placed there by File Explorer, this code generates an error.

I'm pretty sure this worked correctly in earlier 32 bit versions of my program, but it also fails to move in my last 32 bit version in D10.3 and IE 13.7.0. I'm hoping there is a simple fix?


J.R.
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 02 2025 : 20:54:28
Hmm, there's a million things that could be causing that in a complex application. Please try to create some demo that recreates the issue, e.g. by creating a copy of your application and stripping out everything irrelevant. I expect during this process you will find the cause, but if not forward me the simple demo.



Nigel
Xequte Software
www.imageen.com
jrpcguru Posted - Mar 02 2025 : 19:26:16
Access violation at address 0000000000000DF9F49 in module 'FileManager.exe' (offset 9F49). Read of address 00000000008D51CF0

I don't know if it always that exact memory addresses, but it consistent in when it happens.

J.R.
xequte Posted - Mar 02 2025 : 19:09:28
Hi JR

Presently the file specific popup menu is always shown for TImageEnMView (so no paste option), but we have fixed that in the current beta. You can email us for it.

I'm not sure what is happening in your application. What is the error you are seeing?



Nigel
Xequte Software
www.imageen.com
jrpcguru Posted - Mar 02 2025 : 16:13:27
I am using Win 11.

I just compiled the Multi\Explorer\ExplorerDemo.dpr with D10.3, 32 bit. I also compiled it as 64 bit, D12.2, like my program. The results are the same.

The right click menu on the tree panel lets me Cut a folder. If I use the right click menu in the tree panel on another folder, it successfully pastes/moves the desired folder.

If I then use the right click menu in the file panel, Cut is an option. But paste is not activated on the right click for either the tree panel or file panel. This happened several times, but not consistently. Argh!

If I right click on a folder within the target folder, paste is available and pastes into the hi-lited subfolder. And that is the same as File Explorer.

If I use the right click menu on the file panel to Cut, and right click on an empty spot in another folder's file panel, the pasted folder lands in the currently hi-lited folder, not in the target folder. (the target folder has several subfolders in it and I desire it to join those folders, not be inside one of them).

If I first click into the empty spot, then right click-paste, the folder is pasted correctly into the blank space.

File Explorer handles this correctly and pastes the folder into the blank space just by right clicking the blank space.

Using hotkeys works correctly, since I have to left click into the blank spot. Ctrl+V pastes into the blank spot as desired.

The demo seems to be inconsistent in activating the Paste option on the right click. Ctrl+V pastes even when that option is not on the right click menu.
===============================================

Then I added a button to display the copy or move files using the code I included above.
The demo now shows that Cut does go on the clipboard as a Move, whereas my program consistently fails to do that.

I have carefully compared the Uses and FormCreate in the Demo with my program and tested setting each configuration option to be the same. My program still fails to Cut properly.
I use my own popup menu for the Tree and the File panels. I switched to the system menu that the demo uses. Cut now generates the same error that I documented above for Cut from File Explorer.

I hope you have a clue why this is happening. My program has many Jedi and TMS components, in addition to ImageEn components.

I have used both Cut options with the same result:
CutFilesToClipboard(MainForm.Handle, slFileList);
//IEFolderMView.CutSelectedFilesToClipboard();


J.R.
xequte Posted - Mar 01 2025 : 19:25:01
Hi JR

I'm not seeing that. Does it happen with our Explorer demo too? What version of Windows are you using? Are the files locked/protected in any way?


Nigel
Xequte Software
www.imageen.com