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
 A component similar to ShellListView

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
ali Posted - May 30 2019 : 10:14:48
Hi

I want a component which we can do easily view similar to windows explore for developer.

It support thumbnails of folder and files.

It is very useful for developers.

I checked imageenfoldermview and imageenmview and working with both components is very hard for this propose.

Best Regards

Ali Abbasi
20   L A T E S T    R E P L I E S    (Newest First)
ali Posted - Jun 10 2019 : 08:13:53
Hi Nigel

I am in business trip and you realssed new imageen.
Do you added below properties for IEFoldermview?

If No, Please you will added append/delete ... to IEFoldermview for append folders and files to a folder include folders and file.

Best Regards

Ali Abbasi

ali Posted - Jun 07 2019 : 03:04:11
Dear Nigel

I used LockUpdate() and UnLockUpdate() and thank you.
My problem of iefoldermview sort fixed by your sample.
Better sort is sort by type and by name together.
For example sort folder Acmilan, folder Barsa, folder Zagreb after that images file
Ali.bmp,Bob.bmp.jpg,Bob.jpg... after that Ali.doc,Bob.doc....



Best Regards

Ali Abbasi
xequte Posted - Jun 07 2019 : 00:25:09
> I test it 55MB jpg 1.5GB tiff and 2.2GB tiff images

Those are massive files. I'm quite sure any application is going to slow while loading them. Did any of the options available in the Performance demo improve it?

> Where most use LockUpdate() and unLockUpdate for my codes?

LockUpdate() before making a lot of changes, and UnlockUpdate() when you are finished. Whether it increases speed will depend on your usage.


Regarding the sorting issue, what is your value for:

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

You can also manually call Sort:

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


Nigel
Xequte Software
www.imageen.com
ali Posted - Jun 06 2019 : 02:58:12
Dear Nigel

Added after load below code for batch load items and do not working:
IEFolderMView.RefreshSorting;

I added load it code for load folder and do not working.

I added to IEFolderMViewFolderChanged event of IEFolderMViewFolder and it do order first folders and after files.
Also do not sort all folders by name and after that sort all folders by name!
//////////////////////////////////////////////////////////


procedure TAttachment_Contracting_View_Form.BitBtn1Click(Sender: TObject);
var
  openDialog : topendialog;    // Open dialog variable
  i : Integer;
  Full_Path1,Old_File_Name11:string;
begin
  WaitLabel.Caption :='';
  Full_Path1 := PChar(Path_of_Documents1+'\'+'Contracting'+'\'+ MainForm.ContractingTable.FieldByName('employee_number_correct').AsString )+'\';

  if not DirectoryExists(Full_Path1)
   then CreateDir(Full_Path1);

  // Create the open dialog object - assign to our open dialog variable
  openDialog := TOpenDialog.Create(self);

  // Set up the starting directory to be the current one
  openDialog.InitialDir := GetCurrentDir;

  // Allow multiple files to be selected - of any type
  openDialog.Options := [ofAllowMultiSelect];

  // Display the open file dialog
  if  openDialog.Execute then
  begin
   // Display the selected file names
   for i := 0 to openDialog.Files.Count-1 do
   begin
     IEFolderMView.AppendImage(openDialog.Files[i], True );
     WaitLabel.Caption := ' Please wait... '+openDialog.Files[i];

    //Copy all files in the control a new folder
    Old_File_Name11 := openDialog.Files[i];
    DM1.CopyDir2(Old_File_Name11 ,Full_Path1);
   end;
  end;

  // Free up the dialog
  openDialog.Free;
  WaitLabel.Caption :='';
end;
////////////////////////////////////////////////
procedure TAttachment_Contracting_View_Form.BitBtn2Click(Sender: TObject);
var
  Full_Path1,Old_File_Name11:string;
begin
  Full_Path1 := PChar(Path_of_Documents1+'\'+'Contracting'+'\'+ MainForm.ContractingTable.FieldByName('employee_number_correct').AsString )+'\';

  if not DirectoryExists(Full_Path1)
   then CreateDir(Full_Path1);

  with TFileOpenDialog.Create(nil) do
   try
    Options := [fdoPickFolders];
    if Execute then
     begin
      IEFolderMView.AppendImage(FileName, True );

      WaitLabel.Caption :=WaitLabel.Caption :='Plese wait'+'...'+FileName;

      //Copy all files in the control a new folder
      Old_File_Name11 := FileName;
      DM1.CopyDir2(Old_File_Name11 ,Full_Path1);
     end;
   finally
    Free;
   end;

  WaitLabel.Caption :='';
end;

///////////////////////////

Best Regards

Ali Abbasi
ali Posted - Jun 06 2019 : 01:22:52
Dear Nigel

Thank you for your help.

3. I can not use below code:
WindowsErase(Form1.Handle, 'C:\My Image.jpg', True, True, True);
Please send with delphi sample for windowd erase and copy files or folders.
But my delete code working good.

5. Try the performance demo.
I test it 55MB jpg 1.5GB tiff and 2.2GB tiff images and it computer was low and memory usage was 93% and hard disk usage (no SSD hard disk) was 97% until 100%.

6. Your code is OK, but you should call LockUpdate() and UnlockUpdate(); to speed it up.

Where most use LockUpdate() and unLockUpdate for my codes?
I tested and I do not increase speed.
I use a folder with one big 2.2GB tiff and iefoldermview with thumbnails can not view images and computer hang, I deleted big 2.2GB and iefoldermview show view correctly.
Also can not show thumbnail for it image.

Best Regards

Ali Abbasi
xequte Posted - Jun 05 2019 : 23:15:26
Hi Ali

1. In next weeks release you can call UpdateFileList() to remove files that are no longer available.

2. After adding files call: IEFolderMView.RefreshSorting();

3. Generate a list of all files to delete (or a specific folder) and call WindowsErase

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

4. Yes, in next weeks release

5. Try the performance demo:

\demos\Multi\MViewPerformance\Performance.dpr

6. Your code is OK, but you should call LockUpdate() and UnlockUpdate(); to speed it up


Nigel
Xequte Software
www.imageen.com
ali Posted - Jun 05 2019 : 13:01:54
Dear Nigel

I wrote below code for delete folder for iefoldermview and it working good, but I thinks with iefoldermview you can send me better codes.

procedure TAttachment_Contracting_View_Form.BitBtn_Delete_AttachmentClick(  Sender: TObject);
var
  Full_Path1:string;
  i:Integer;
begin
 Full_Path1 := PChar(Path_of_Documents1+'\'+'Contracting'+'\'+ MainForm.ContractingTable.FieldByName('employee_number_correct').AsString )+'\';
 if MessageDlg('can you delete folder? ', mtConfirmation,[mbok,mbCancel],0) =  mrCancel Then
   Abort
 else
 if DirectoryExists(Full_Path1) then
  begin
   for i := 0 to IEFolderMView.ImageCount - 1 do
    begin
    IEFolderMView.SelectImage(i);
    end;
   IEFolderMView.DeleteSelectedImages;
   DM1.DelDir(Full_Path1);
  end;
end;



Best Regards

Ali Abbasi
ali Posted - Jun 05 2019 : 05:05:50
Dear Nigel

Thank you for your help.

But my problems with some test are:
1. When I delete a files or folders then IEFolderMView show IEFolderMView deleted icon and I want to which IEFolderMView do not show icon of deleted folders or files.
You can see in the attachment which show with red flash.

2. Imageen do not Sort By Type after add new folder (I want to IEFolderMView show first folders after that files...).
You can see in the second attachment.

3. Can I delete whole (directory) folder of IEFolderMView with Delphi code?

4. Can I active select all for folders and files by Ctrl+A keys in IEFolderMView also with IEFolderMView Delphi code?

4.I tested IEFolderMView load batch images with open dialuge in with 10 files with size 1.4GB and 2.5GB... then memory usese and specially hard disk speed is low.

Best Regards

Ali Abbasi



xequte Posted - Jun 04 2019 : 17:28:29
Hi Ali

The files are already on the system, so you should just do a file copy from their current location to their new one.

You could do something like:

// Copy all files in the control a new folder
if WindowsSelectDirectory( 'Specify Folder to Copy to:', newFolder ) = False then
  exit;
for I := 0 to ImageEnMView1.ImageCount - 1 do
begin
  oldFilename := ImageEnMView1.ImageFilename[I];
  WindowsCopy(Form1.Handle, oldFilename, newFolder, True, True, True);
end;



Nigel
Xequte Software
www.imageen.com
ali Posted - Jun 04 2019 : 01:28:30
Dear Nigel

I can add with append and it working good and I can not save all files/folders of IEFolderMView to other directory.
this directory:
PChar(Path_of_Documents1+'\'+'Contracting'+'\'+MainForm.ContractingTable.FieldByName('employee_number_correct').AsString )

In the below you can see my codes:

procedure TAttachment_Contracting_View_Form.BitBtn1Click(Sender: TObject);
var
  openDialog : topendialog;    // Open dialog variable
  i : Integer;
begin
  WaitLabel.Caption :='Plaease wait... ';

  //Change table name **********************
  if not DirectoryExists( PChar(Path_of_Documents1+'\'+'Contracting'+'\'+MainForm.ContractingTable.FieldByName('employee_number_correct').AsString ) )
   then CreateDir( PChar(Path_of_Documents1+'\'+'Contracting'+'\'+ MainForm.ContractingTable.FieldByName('employee_number_correct').AsString ) );

  // Create the open dialog object - assign to our open dialog variable
  openDialog := TOpenDialog.Create(self);

  // Set up the starting directory to be the current one
  openDialog.InitialDir := GetCurrentDir;

  // Allow multiple files to be selected - of any type
  openDialog.Options := [ofAllowMultiSelect];

  // Display the open file dialog
  if  openDialog.Execute then
  begin
   // Display the selected file names
   for i := 0 to openDialog.Files.Count-1 do
   begin
     //Change table name **********************
     IEFolderMView.AppendImage(openDialog.Files[i], True );
     WaitLabel.Caption := openDialog.Files[i];
   end;
  end;

  // Free up the dialog
  openDialog.Free;
  WaitLabel.Caption :='';
end;

Problem is I can not save all files/foldsrs of IEFolderMView to other directory (folder).

Best Regards

Ali Abbasi
ali Posted - Jun 04 2019 : 00:53:06
Hi Nigel

> I don't know if I understand your requirements fully.
> When you say "refresh" do you mean refilling the control when files are added or deleted to a watched folder.

Yes I want refilling ImageEnFolderMView when I added with Delphi code and I checked with TlImageEnFolderMView.append (...) it refilling good.

> But you are manually filling the control with your own code (custom file list).
> How can any control automatically refresh when it does not generate its own file list?

Other shelllistvuew refilling good by manually add files/folders.
You are better than me find a solution for this.
ImageEnFolderMView.append working good and this is useful for us.

Best Regards

Ali Abbasi
xequte Posted - Jun 03 2019 : 16:38:59
Hi Roy

Yes, we'll have a fix in the upcoming release (next week).


Nigel
Xequte Software
www.imageen.com
xequte Posted - Jun 03 2019 : 16:38:29
Hi Ali

I don't know if I understand your requirements fully. When you say "refresh" do you mean refilling the control when files are added or deleted to a watched folder?

You can enable automatic refresh using:

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

But you are manually filling the control with your own code (custom file list). How can any control automatically refresh when it does not generate its own file list?

Nigel
Xequte Software
www.imageen.com
rmklever Posted - Jun 03 2019 : 15:39:30
Hi Nigel,

I see that the WebP images are loaded correctly in the Explorer both for thumbs and preview. Have you figured out a solution?

Roy M Klever
Klever on Delphi - www.rmklever.com
Uwe Posted - Jun 03 2019 : 14:41:52
Hi Nigel,

okay, I will test it and report back. Give me a few days, though. I've got visitors over at the moment.

-Uwe
ali Posted - Jun 03 2019 : 10:30:04
Dear Nigel

I added files/folders with Delphi code and with open dialuge and TImageEnFolderMView can not refresh.
I open again (call again) a folder with TImageEnFolderMView can not show new files/folders, but all shelllistview components can automatically refresh without any problem.
So you will add refresh to your component or at least a code for fill again with new files and folder then TImageEnFolderMView is complete for windows folder show.


Best Regards

Ali Abbasi
xequte Posted - Jun 03 2019 : 01:35:18
Hi Ali

Use AppendFile to add a folder or a file:

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

When you manually fill a TImageEnFolderMView, it cannot automatically refresh.


Nigel
Xequte Software
www.imageen.com
xequte Posted - Jun 03 2019 : 01:31:18
Hi Uwe

8.1.1 should be the same in this regard, so your results would be useful.


Nigel
Xequte Software
www.imageen.com
ali Posted - Jun 02 2019 : 17:06:01
Hi Uwe

I think you most use new version of imageen.

Best Regards

Ali Abbasi
Uwe Posted - Jun 02 2019 : 16:05:53
Hi Nigel,

I use ImageEn 8.1.1 . Does it make sense to compile the demo with it?

The JPGs were all about 1 MB each. System specs: Win 10 (64 bit), all updates applied. 16 GB RAM, i7 (4 cores), GeForce GTX 960 graphics card, DirectX 12

-Uwe