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
 ImageEn ExecuteOpenDialog Feature Request

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
PeterPanino Posted - Jul 06 2025 : 06:34:39
I often use a similar code to load an image file in ImageEnView:

with ImageEnView1.IO do
  LoadFromFileAuto(ExecuteOpenDialog());


Request: If the CLIPBOARD contains an image FILE (or a literal PATH to an image file), then show this image in the preview area of the ImageEn OpenDialog, along with a button to load this image file from the clipboard.

This would be a very useful feature in cases where there is no visible ImagenView control (only temporarily created) or when the user decides to select the image source (file or clipboard) at the time the OpenDialog is displayed, as it would spare the user from having to save the clipboard image only to be able to load it afterwards.
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 10 2025 : 21:51:18
Hi Peter

That is a very old component (pre-Windows XP) so I don't know that I would be using that.

You could try adding a paste button yourself to TOpenImageEnDialog using:

http://www.imageen.com/help/TOpenImageEnDialog.OnCreateCustomControls.html

Something like:

procedure TfrmMain.dlgOpenImageCreateCustomControls(Sender: TObject);
const
  BUTTON_TOP    = 0;
  BUTTON_LEFT   = 410;
  BUTTON_WIDTH  = 140;
  BUTTON_HEIGHT = 25;
var
  p: TWinControl;
  btn: TButton;
begin
  p := (sender as TOpenImageEnDialog).InfoPanel;
  btn := TButton.Create(p);
  btn.Parent := p;
  btn.Caption := 'Paste from Clipboard';
  // Note: Need to handle screen scaling
  btn.SetBounds( BUTTON_LEFT, BUTTON_TOP, BUTTON_WIDTH, BUTTON_HEIGHT );
  btn.OnClick := OpenDialogPasteBtnClick;
end;

procedure TfrmMain.OpenDialogPasteBtnClick(Sender: TObject);
var
  dialogHandle: HWND;
begin
  dialogHandle := GetActiveWindow;

  if ImageEnView1.Proc.CanPasteFromClipboard() = False then
  begin
    MessageDlg( 'There is no image on the clipboard', mtInformation, [ mbOK ], 0 );
    SetForegroundWindow( dialogHandle );      // Bring to front
  end
  else
  begin
    // Close the Open Dialog
    if dialogHandle <> 0 then
      EndDialog( dialogHandle, IDCANCEL );

    ImageEnView1.Proc.PasteFromClipboard()
  end;
end;


Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Jul 10 2025 : 07:31:43
There is a VCL component "Dialog Workshop" that allows (among other things) modifying standard Open/Save dialogs. I will explore possibilities to achieve the requested behavior with this component.
xequte Posted - Jul 08 2025 : 04:11:55
Hi Peter

Unfortunately the built-in open dialog is becoming less relevant as Windows advances, so we tend to recommend using the "Modern Windows" dialog option instead (as it supports all modern Windows features). However this means we cannot add functionality to it.

Nigel
Xequte Software
www.imageen.com